Task 1: Bring the Data into Power Query

  1. Open a blank workbook and launch Power Query to examine the contents of a text file.

Data (tab) -> Get & Transform (group) -> From Text/CSV.

  1. Browse to the text file.
  2. In the Power Query preview window, select Transform Data.
  3. Rename the Query “SalesByState”.

The only information we need to retain for our report is the State and Sales.

Task 2: Determine the State for Each Record

  1. Select the “CityState” column and extract the state portion by clicking Transform (tab) -> Text Column (group) -> Extract -> Text Between Delimiters.
  2. The Start Delimiter will be “(“ [open parentheses – no quotation marks]
  3. The End Delimiter will be “)“ [close parentheses – no quotation marks]
  1. Click OK.
  2. Rename the “CityState” column to “State”.

Task 3: Group Records by State

  1. Select Home (tab) -> Transform (group) -> Group By.
  2. In the Group By dialog box, enter the following parameters and click OK.
  1. Not necessary for reporting but sort the results in Ascending order by State.

Featured Course

Black Belt Excel Package

What would your life look like if you became an Excel Black Belt? You’ll get the best deal with this (cost savings) package. It will take you from Excel Newbie to Grand Master.
Learn More
Excel Black Belt course cover

Task 4: Load the Results into an Excel Table

  1. Select Home (tab) -> Close (group) -> Close & Load.

The results are as follows.

Task 5: Create the Filled Map Chart

  1. Select a cell in the results table and click Insert (tab) -> Charts (group) -> Maps -> Filled Map.

Note: Available in Microsoft 365 and Excel 2021.

The base results are as follows.

NOTE: In the event the map does not detect your states properly, add a Custom Column in Power Query named “Country” that reads “United States”.

Task 6: Customize the Filled Map Chart

  1. By double-clicking anywhere on the Filled Map chart, you can gain access to the chart customization controls.
  1. Experiment with the different options for Map ProjectionMap Area, and Map Labels.
  2. Experiment with changing the colors for the Minimum and Maximum values.  These can be based on the extremes of the data, fixed values, or fixed percentages.

NOTE: The labels will appear in states that have enough size to display the text.  You may need to increase the size of the chart to read longer names.  This is a prime reason for using 2-letter state codes in place of full state names.

  1. Right-click any state and select Add Data Labels to display the underlying values for Sales.
  2. Select any state’s data label (sales value) and customize the number formatting as desired (ex: comma style with no decimal place precision.)

Mission accomplished.

Not a single formula was written; not a single function used.

Depending on the customization level, it’s possible you could have created this entire thing with barely any keyboard interaction.

Learn more about Power Query here.

You can also check out an alternative map chart solution that works with any version of Excel, or learn how to create map charts in Power BI.

Practice Workbook

Feel free to Download the Workbook HERE.

Excel Download Practice file

Leila Gharani

I'm a 6x Microsoft MVP with over 15 years of experience implementing and professionals on Management Information Systems of different sizes and nature.

My background is Masters in Economics, Economist, Consultant, Oracle HFM Accounting Systems Expert, SAP BW Project Manager. My passion is teaching, experimenting and sharing. I am also addicted to learning and enjoy taking online courses on a variety of topics.