Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Shape map to show sales indicators by type

Hi,

 

I need shape map visual in Power BI in which i can show sales by state.

 

Now this 'sales' should be like this, if sales belong to 'my item' it should show red color and rest of the items will show one different color.

 

here you can assume 'my item' refers to one specific category value for which I need diff. color and rest of the other categories

' value will show another diff. color.

 

Any suggestions?

 

Thanks.

3 REPLIES 3
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

Assum you have two tables and they have relationship with item id.

2.PNG3.PNG

4.PNG

You can create a measure as below and create a rule on data color based on the measure.

Measure = IF(SELECTEDVALUE('item'[type])="myitem",1,0)

5.PNG

6.PNG

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

HI @v-jayw-msft ,

 

Thanks for that. I think I didn't give my requirements clearly earlier. my bad.

 

Actually I need If in a Single state both the sales are available i.e. Florida has sales for my Item and others as well. Is it possible to highlight those two sales part separately.

 

For more understanding see below-:

 

commPBI1.PNG

 

 

 

 

 

 

 

 

commPBI3.PNGcommPBI2.PNG

 

 

 

 

 

 

 

 

 

 

 

 

Legend shows two but only first value is being taken by map.

Is it possible to divide the shaded by different colors based on 'Sales Type' Column.

 

Thanks a lot.

amitchandak
Super User
Super User

@Anonymous , you can create a color measure like this

color = if(FIRSTNONBLANK(Table[Item],"") = "Item1","green","red")

and use this in conditional formatting after selecting field option.

Refer

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-numbers-in-the-column
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

This uses Rank for top brand , you only need use Item name

https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.