Forum Discussion

Kebas_Leech's avatar
Kebas_Leech
Helper I
2 years ago
Solved

Possible Bucketing

Hello everyone,

 

I have a simple measure that calculates the % of losses that I have: [% losses] = Divide ( loss, allquantity)

What I'm trying to figure out is a way to filter that measure, [%losses], given certain criteria. 

Example: which is the total [%losses] when considering values that are less than 5%, 10% and so on, like its shows in the following graph:

 

 

I thought this was a case of dynamic sgmentation/bucketing but i cant seem to make it work.

Any ideas?

 

Thanks

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Kebas_Leech ,

     

    I suggest you to create a Percentage table to help your calculation.

    Percentage = 
    GENERATESERIES(0,1,0.05)

    Measure:

    Measure = 
    CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER('Table',[% losses]<=MAX(Percentage[Percentage])))

    Result is as below.

     

    Best Regards,
    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

3 Replies