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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Da_Roon
New Member

Select category based on comparing a value to multiple values in an other table

Hello everybody,

 

after a few days of trying and struggling I hope someone here can help me with the following issue:

 

In one of my tables I have a percentage, which is displayed in a decimal number.

 

In another table I have like 5 categories + percentages (also in decimal number format) for the beginning and ending of the specific range for the category. It looks like this:

 

CategoryStart of categoryEnd of category
A0.91
B0.50.9
C0.250.5
D00.25
E 0

 

I would like to compare my calculated value to the start and end values and based on the range where my calculated value falls in, select the category.

 

I'm using DAX for this and my tables aren't related to eachother.

 

I hope this case is clear enough and someone can help me.

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Da_Roon , I think you are looking for Dynamic Segmentation 

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

barritown
Super User
Super User

@Da_Roon, I am sure that you will solve your problem using the references provided by @amitchandak, but on the screenshot below you can find an alternative solution using a calculated column - check it if you like.

 

It has one limitation though - it won't work if you have a NULL value in the row related to the category "E" (I have tweaked this table as you can see on the screenshot). As far as I understand, you use this category for catching zeroes.  

 

Categories.png

View solution in original post

5 REPLIES 5
barritown
Super User
Super User

@Da_Roon, I am sure that you will solve your problem using the references provided by @amitchandak, but on the screenshot below you can find an alternative solution using a calculated column - check it if you like.

 

It has one limitation though - it won't work if you have a NULL value in the row related to the category "E" (I have tweaked this table as you can see on the screenshot). As far as I understand, you use this category for catching zeroes.  

 

Categories.png

Hey @barritown . Thank you for this solution. I can verrify that it worked splendidly !

amitchandak
Super User
Super User

@Da_Roon , I think you are looking for Dynamic Segmentation 

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I can also verify that this solution works.

Thank you very much for your reply @amitchandak . I was searching for a few days, but I never would have thought to search for this specific topic.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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