Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Filter Group While Using Rankx

Hi Everyone,

 

Its a very simple query but I am not able to get the results or not able to find the logic. I want filter some values from group to give the ranking.

 Raw Data

 

 

GroupItemValueRank
Oneitem17781
Oneitem26172
Oneitem35403
ThreeItem48472
ThreeItem68731
ThreeItem97813
Twoitem85123
TwoItem107851
Twoitem56232

 

Further I used Rankx to calcualte the group wise rank

 

RankXDescMeasure2 = 
    RANKX(
        ALL('Table'[Group]),
        CALCULATE(
            SUM('Table'[Value])
        ),
        ,
        DESC
    )

 

GroupValueRank1
One19352
Three25011
Two19203

 

How would I filter one or two or three and give a new rank like below:

GroupValueRank1
Three25011
Two19202

 

 

Please help !

 

Regards

Uphar

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi, Thanks it works..

     

    If you could also help me with Month on Month Rank change DAx.. My rank is changing month on month basis for same group.

     

    I want to check the Rank difference of this month to last month  (Trend)

     

    Last Month Ranking

    MonthUnitDivison Ranking checkAverage of Star Rating
    FebGroup1213
    FebGroup1122.76
    FebGroup1032.62
    FebGroup942.57
    FebGroup852.36
    FebGroup762.33
    Feb 72.29
    FebGroup582.22
    FebGroup492.11
    Feb 102.06
    FebGroup1112
    FebGroup2111.95
    FebGroup3121.8
    FebTBA13 

     

    This month ranking

    MonthUnitDivison Ranking checkTrend
    MarGroup121312
    MarGroup1175
    MarGroup1041
    MarGroup93-1
    MarGroup83-2
    MarGroup73-3
    Mar 4-3
    MarGroup5102
    MarGroup42-7
    Mar 9-1
    MarGroup19-2
    MarGroup28-3
    MarGroup39-3
    MarTBA4-9

     

    Tend is representing this month to last month rank difference.. I am new in powerbi so not able to apply the Time intellegence function.. I believe you can answer this question too..

     

    Regards

    Uphar

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, Thanks it works..

       

      If you could also help me with Month on Month Rank change DAx.. My rank is changing month on month basis for same group.

       

      I want to check the Rank difference of this month to last month  (Trend)

       

      Last Month Ranking

      MonthUnitDivison Ranking checkAverage of Star Rating
      FebGroup1213
      FebGroup1122.76
      FebGroup1032.62
      FebGroup942.57
      FebGroup852.36
      FebGroup762.33
      Feb 72.29
      FebGroup582.22
      FebGroup492.11
      Feb 102.06
      FebGroup1112
      FebGroup2111.95
      FebGroup3121.8
      FebTBA13 

       

      This month ranking

      MonthUnitDivison Ranking checkTrend
      MarGroup121312
      MarGroup1175
      MarGroup1041
      MarGroup93-1
      MarGroup83-2
      MarGroup73-3
      Mar 4-3
      MarGroup5102
      MarGroup42-7
      Mar 9-1
      MarGroup19-2
      MarGroup28-3
      MarGroup39-3
      MarTBA4-9

       

      Tend is representing this month to last month rank difference.. I am new in powerbi so not able to apply the Time intellegence function.. I believe you can answer this question too..

       

      Regards

      Uphar

      • Pragati11's avatar
        Pragati11
        Super User

        Hi Anonymous ,

         

        It will be nice to have a new thread for this as this will require a new DAX. It just helps in keeping the issues differently for everyone.

        The query raised in this thread looks like is resolved.

         

        Thanks,

        Pragati