Forum Discussion

matsahiro's avatar
matsahiro
Helper II
5 years ago
Solved

Bin Naming Output

Hello all,   I'm currently binning some records. Say I have products that need to be binned by the amount of revenue each product brings in. Revenue is 0 to 100k, where I'll need 10 bins. Right now...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi matsahiro ,

     

    So you should want the effect of dynamic selection.

     

    Here's my workaround.

    1.Create two what-if parameters.

     

    2.Create a measure.

    Bin Number = 
    VAR maxbinnum =
        SELECTEDVALUE ( 'Bin Range'[Bin Range] )
    VAR maxrev =
        SELECTEDVALUE ( 'Revenue Range'[Revenue Range] ) * 1000
    VAR interval =
        DIVIDE ( maxrev, maxbinnum )
    RETURN
        ROUNDUP ( DIVIDE ( MAX ( 'Table'[Revenue] ), interval ), 0 )

     

     

    You can check more details from here.

     

     

    Best Regards,

    Stephen Tao

     

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