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
LamSar
Helper III
Helper III

Grouping / binning in a measure

Good afternoon, 

 

I need help with grouping/binning.

 

I have this slicer: 

 

LamSar_1-1651657795051.png

The values are between 0 and 53
 Is there any way that I can group the values using a measure?
I only want these values: 0,1,2,3, > 3
 So all values between 4 and 53 have to be under >3
I am using a tabular model, so grouping and binning is not possible. It is also not possible to add a calculated column

 

Any ideas?

1 ACCEPTED SOLUTION
LamSar
Helper III
Helper III

Hello,

Thank you for your answer. 

I can't add a conditional column via Power Query, because I'm using a tabular model (live connection).

View solution in original post

4 REPLIES 4
LamSar
Helper III
Helper III

Hello,

Thank you for your answer. 

I can't add a conditional column via Power Query, because I'm using a tabular model (live connection).

Hello @LamSar ,

I believe a measure in a slicer would not be possible, the reason is measure is calulated at run time.

 

I think, two ways possible. One is to add such additional column in source table itself. This is simple to implement, if you have control over source.

Second is to create a dimension table containing these numbers and relate with the fact table. Use dimension table's column in slicer. This dimension table can be created in power bi locally, no need to convert anything at source.

 

Hope it helps.

Ok. Thank you for your message!

mahenkj2
Solution Sage
Solution Sage

I think you need a slicer with values 0,1,2,3 and >3. To achieve this, you can add a condition column in power query. Use this column in the slicer instead and you should be able to achieve your desired effect.

 

I attach a sample file. I have assumed that it is not compulsarily needed a measure in this slicer.

 

https://drive.google.com/file/d/15619QRVqYoNfgQHXH2-vq6M5ITUQMWgh/view?usp=sharing

 

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.