Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi~ I want to made a map visual that shows the best sold product in each ZIP code and display the product name as label on map. Below is the sample of my data. Each ZIP cod is distinct.
ZipMapped | Most Sold Product | Latitude | Longitude | Total Units | State |
10030 | A | 40.81847 | -73.9433 | 1 | NY |
10705 | B | 40.92654 | -73.8725 | 3 | NY |
14025 | D | 42.62539 | -78.7268 | 4 | NY |
19320 | E | 39.96886 | -75.8292 | 1 | PA |
20190 | F | 38.96146 | -77.3418 | 6 | VA |
20720 | A | 38.98851 | -76.791 | 2 | MD |
21787 | B | 39.65745 | -77.1691 | 5 | MD |
22406 | C | 38.41436 | -77.5347 | 7 | VA |
23221 | D | 37.5532 | -77.4897 | 1 | VA |
27530 | E | 35.36828 | -78.0929 | 2 | NC |
27889 | F | 35.51927 | -76.8892 | 1 | NC |
28304 | F | 35.02063 | -78.9909 | 10 | NC |
28538 | Z | 35.42196 | -77.5912 | 12 | NC |
29566 | D | 33.81647 | -78.758 | 4 | SC |
30017 | A,B,C | 33.91692 | -84.041 | 2 | GA |
30075 | D,E | 34.0552 | -84.3705 | 5 | GA |
34208 | F | 27.46782 | -82.512 | 10 | FL |
The error I have is that after I put Most Sold Product in Location, Latitude in Latitude, Longitude in Longitude, and then click the longitude and latitude to average. I found that the ZIP code's location on the map is wrong. Below is the map I used the above data. For example, the tooltip show the Florida point, but it shows in South Carolina. The Longitude and latitude is different too. How can I sove this problem?? Thanks!
Solved! Go to Solution.
Ok then what I would suggest is to rather remove the item from location.
Put your Product Name in the Legend Area.
And then leave the Lat and Long as the values that they are.
Then if you use the State as a Slicer you will be able to see the purchases in each state.
Then if you wanted to see who was the Max or Min, you could create a table with all the relevant details. The table will filter based on what you select in the slicer. As well as in the table you can then change the order by clicking on the column value (which will enable the table to sort by largest purchase)
Hi @Gracie
I took your data and imported it.
What I then did was I went to the Modeling tab and under the Properties changed the Data Category to Latitude for Latitude as well as Longitude with Longitude. I also changed the Default Summarization from Sum to Don't Summarize as shown below.
I then created the Map and put in the Lat and Long and then filtered to FL and this looks correct based on your data.
It would appear that possibly the Lat and Long properties were not set for the mapping?
Thank you. But I want the most sold product in the location field so that when I display the label, it will show on the map like the picture below. However, in order to do that, I have to use average of longitude or latitude which will cause wrong location on the map. Do you know how can I make sure the right location as well as label display?
Go to query editor and change Lat and Long to text data type and save and close .. In power BI desktop go to modeling tab and change Lat to Lat and Long to Long under data category also make them Don't summarize , then place the fields in the respective tabs , Now you will see them as first lat and first long click on the down arrow button and make it to Don't summarize then you will see the correct lat and long in the visulazation..
Hope this will help you..
Yes. I want to show the product name as label in the map.
Ok then what I would suggest is to rather remove the item from location.
Put your Product Name in the Legend Area.
And then leave the Lat and Long as the values that they are.
Then if you use the State as a Slicer you will be able to see the purchases in each state.
Then if you wanted to see who was the Max or Min, you could create a table with all the relevant details. The table will filter based on what you select in the slicer. As well as in the table you can then change the order by clicking on the column value (which will enable the table to sort by largest purchase)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |