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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
dwhittaker1
Helper II
Helper II

summarize switch statement ?

I would like to a create switch statement or any other measure that summarizes the "percentage of booked" column in the table below and tells me the number of times an item falls within the range I have specified in the switch statement. Below is an exampl of the ranges i have specified. my desired output would show me 3 items  were less than 70%, 3 items were between 70 and 80 percent and one item was between 80 and 90 percent

 

dwhittaker1_0-1711752382901.png

 

 

Item     Open Orders      Total Booked     Percentage of Booked    
book7810078%
toy4910049%
hat6912058%
cup7911072%
bill199021%
paper688085%
laptop7410074%

 

 
1 ACCEPTED SOLUTION

Power BI does not provide dynamic bucketing, you need to bring your own buckets.

 

lbendlin_0-1711758626487.png

lbendlin_1-1711758906932.png

see attached.

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

Please indicate the expected outcome based on your sample data.

@lbendlin 

 

 

Range   Count   
< 70%   3
70% - 80%   3
80% - 90%   1
> 90%   0

Power BI does not provide dynamic bucketing, you need to bring your own buckets.

 

lbendlin_0-1711758626487.png

lbendlin_1-1711758906932.png

see attached.

 

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.