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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
labuser1235
Helper IV
Helper IV

Banding, Bucketing or Segmentation Problem

Hi All,

 

I have two tables where I want to get true or false as shown as output in table2. Based on the price range after three column matches, result should be thrown. I have tried the below method as shown in the link. However I had no luck because it shows nothing not even the error. 

 

Thanks in advance, please help.

 

Below are the tables:

 

Table1

Fruit NameTypeStart PriceEnd Price
OrangeType-115
OrangeType-2610
OrangeType-31115
AppleType-116
AppleType-2710
AppleType-31114
GrapesType-114
GrapesType-259
GrapesType-31015

 

Table2

Fruit NameTypePrice SoldPrice Range Check 
OrangeType-26TRUE
Apple Type-37FALSE
GrapesType-14TRUE
OrangeType-13TRUE
OrangeType-35FALSE
Apple Type-18FALSE
GrapesType-22FALSE
GrapesType-314TRUE
OrangesType-16FALSE

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try a new column in table 2. If required adjust the filter as per need

Price Range Check = if(isblank(countx(filter(table1,table1[Fruit Name]=table2[Fruit Name] && table1[Type]=table2[Type]
					&& table1[Start Price]<=table2[Price Sold] && table1[End Price]>=table2[Price Sold]),table1[Fruit Name])),"False","True")

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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

2 REPLIES 2
amitchandak
Super User
Super User

Try a new column in table 2. If required adjust the filter as per need

Price Range Check = if(isblank(countx(filter(table1,table1[Fruit Name]=table2[Fruit Name] && table1[Type]=table2[Type]
					&& table1[Start Price]<=table2[Price Sold] && table1[End Price]>=table2[Price Sold]),table1[Fruit Name])),"False","True")

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

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

@amitchandak Awesome, worked like charm. Thank you so much, You are the best 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.