Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

pareto calculations

Hi all, here i am trying to calculate pareto calculations based on region. consider if a rank is selected at 50% then i need to calculate the top 50 items sum in the region level and the t...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    1. Modeling – New parameter -- Set the interval size.

    2. Create measure.

    Rank =
    RANKX(FILTER(ALL('Table'),'Table'[Region]=MAX('Table'[Region])),CALCULATE(SUM('Table'[Value])),,DESC,Dense)
    Flag =
    var _top=SELECTEDVALUE('Parameter'[Parameter])
    return
    IF(
        [Rank]<=_top,1,0)
    Rank =
    RANKX(FILTER(ALL('Table'),'Table'[Region]=MAX('Table'[Region])),CALCULATE(SUM('Table'[Value])),,DESC,Dense)

    3. Place [Flag]in Filters, set is=1, apply filter.

    4. Result:

     

    Best Regards,

    Liu Yang

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