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

How to create bucket range to exclude the selected values

Hi

I have community count column, this column contains integer numbers. Here i have to create a bucket filter, that filter contains values as >10,>20,>30...>100. To acheive this i have tried below methods but its not working as i am expected. 

 

Required Output:

If I selected >10 value in filter it should be show values from 11 to max value and exclude the values(1 to 10) from grid similarlly if select for value as >20.

 

BucketRange =
 SWITCH (
  true(),
 Query1[CommunityCount] >10 && Query1[CommunityCount] <= Query1[MaxCount], ">10",
 Query1[CommunityCount] >20 && Query1[CommunityCount] <= Query1[MaxCount], ">20",
 "other"
--)
(OR)
 if(Query1[CommunityCount]>10 && Query1[CommunityCount] <= Query1[MaxCount],">10",if(Query1[CommunityCount] >20 && Query1[CommunityCount] <= Query1[MaxCount], ">20")))

 

 

Thanks in advance. 

 

Regards,

Yuvaraj

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

One sample for your reference. Please check the following steps as below.

 

1. Create a calculated column in the filter table and format it to number.

 

Column = RIGHT('filter'[bucket],LEN('filter'[bucket])-1)

2. Create a measure as below and make the table visual filtered by it as the picture.

 

Measure = var coun = MAX(Query1[community count])
var maxva = MAX('filter'[Column])
return
IF(coun>maxva,1,0)

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

One sample for your reference. Please check the following steps as below.

 

1. Create a calculated column in the filter table and format it to number.

 

Column = RIGHT('filter'[bucket],LEN('filter'[bucket])-1)

2. Create a measure as below and make the table visual filtered by it as the picture.

 

Measure = var coun = MAX(Query1[community count])
var maxva = MAX('filter'[Column])
return
IF(coun>maxva,1,0)

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.