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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rixmcx59
Helper IV
Helper IV

Add a range to a shape map Legend and color saturation

hello all, is it possible to add a range to a legend and color saturation in a CA-Counties shape map. I have this working with the count of items from each county, several counties have the same count so there are about 50 values ranging from 1 too 1598 and of course the numbers will increase. It looks great and works but I would like fewer items in the legend.

I would like to group the values into 5 ranges and use the range in the legend and color saturation

 

thanks for any help

7 REPLIES 7
VikasKarnekanti
Regular Visitor

Hello Team,

I am currently working with Power BI Shape Maps, where I have implemented a time slicer. I am using three columns for maps: Location, Dates Column, and Legend.

I have created a measure to calculate Achievements based on the Dates.

Now, I want to create another measure using the above measure to generate ranges for achievements using the Percentile function. However, the Percentile function does not seem to accept measures directly.

I attempted to address this by creating a summarized table and generating a column for the achievements. But, when the time slicer changes (i.e., transitioning from the start date to the end date), the data changes accordingly. Unfortunately, the ranges do not dynamically adjust for the modified data.

I am seeking guidance on creating a measure for ranges using the achievement measure. For example, the desired output ranges are: 1-30, 31-45, 46-75, 76-99.

 

 

Thank you,
Vikas

parry2k
Super User
Super User

@rixmcx59 you can use RANK to sort your data and display the top x number of records based on the range. read this for classification

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

I'd like to Complimentsif my solution helped me.👉If you can spend time posting the question, you can also make efforts to give Kudos who has helped solve your problem. It's a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Anonymous
Not applicable

Hello,

 

Se if this is helping you 

 

https://www.youtube.com/watch?v=aWkG1fOnmK4

 

Best regards,

AO

rixmcx59
Helper IV
Helper IV

Thanks for the response, I have it working, there was a mistake in my syntax for the Range calculated column.

Would you please show us the formula?

formula formula

I created 2 colums, one to count, then one for the range like

CountOfLicenseID = CALCULATE(COUNTROWS('License'),FILTER('License','License'[CountyName]=EARLIER(License[CountyName])))
Range = IF(License[CountOfLicenseID]<=10,10,IF(AND(License[CountOfLicenseID]>10,License[CountOfLicenseID]<=100),100,IF(AND(License[CountOfLicenseID]>100,License[CountOfLicenseID]<=1000),1000,1001)))

then I just added a text box explaining the legend like 10 = 0~10   100 = 11~100 and so on. if you add range to legend and color saturation you can pick the colors. there might be a better way of doing this but this worked ok for me.

I would have like to to have the IF statement go like IF(License[CountOfLicenseID]<=10,"0~10"  that way the range would show in the legend but PowerBI would not let me mix text and numbers. anyway legend and color saturation seem to prefer numeric values which makes sense.

hope this helps

parry2k
Super User
Super User

@rixmcx59 you can use RANK to rank your data and show top x number of records based on the rank. read this for ranking

 

https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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