Forum Discussion

cheid_4838's avatar
cheid_4838
Helper IV
1 year ago
Solved

Grouping a Percentage Measure

I have the below idle percentages that I would like to group into buckets (80,60,40,20,15,10,5).  Then show the distribution under each.  I created the below switch statement as a column and measure.  When I use it as a column I only get 5, 60, and 80. Not sure why I am only getting those buckets.  When I use it as a measure I can't use it as a row or column.  How do I group a measure that is calculating a percentage into groupings?  I thought this would be a pretty simple excercise.  Any thoughts that could help? Thanks.

 

Idle Grouping = SWITCH(
    TRUE(),
    [Long Idle Percentage] <=.5,"5%",
    [Long Idle Percentage] >.5 && [Long Idle Percentage] <=.10, "10%",
    [Long Idle Percentage] >.10 && [Long Idle Percentage] <=.15, "15%",
    [Long Idle Percentage] >.15 && [Long Idle Percentage] <=.20, "20%",
    [Long Idle Percentage] >.20 && [Long Idle Percentage] <=.40, "40%",    
    [Long Idle Percentage] >.40 && [Long Idle Percentage] <=.60, "60%",
    [Long Idle Percentage] >.60 && [Long Idle Percentage] <=1, "80%+",
    "OTHER")