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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Convert Measure Bin To Column

Hello - 

 

I am analyzing some usage data that is being dimensioned by a variable called Programmer and a variable called Account Number.

 

I have the following measure created (which renders properly) to determine at the Account Number level what percent of an accounts total usage comes from a selected programmer (selected by a slicer).

 

% of Total Viewining = DIVIDE(CALCULATE(SUM(ViewershipData[HoursWatched])),CALCULATE(SUM(ViewershipData[HoursWatched]),ALL(ViewershipData[Programmer])),0)
 
I also have a second measure created (which also renders properly) which takes % of Total Viewing and turns it into a bin at the Account Number level.
 
% of Total Viewership Bin =
VAR q =
[% of Total Viewining]
RETURN
(IF(q <= .02,"0 - 2%", IF(AND(q>.02,q<.05),"2% - 5%", IF(AND(q>=.05,q<.07),"5% - 7%",IF(AND(q>=.07,q<.1),"7% - 10%",IF(q>=.1,"10%+"))))))
 
What I want to be able to do is to filter via a slicer the values that are in the % of Total Viewership Bin. I know you cannot create a slicer based on a measure, so I am wondering if I can turn that into a column or some other way to be able to filter by 5%-7% as an example.
 
Please let me know if you need additional information to help with this.
 
Matt Hampton
1 ACCEPTED SOLUTION

I was able to use the example found on the link below and get what I needed:

 

https://community.powerbi.com/t5/Desktop/Cannot-use-measure-in-slicer/td-p/166909

View solution in original post

1 REPLY 1

I was able to use the example found on the link below and get what I needed:

 

https://community.powerbi.com/t5/Desktop/Cannot-use-measure-in-slicer/td-p/166909

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors