Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Total wrong

Experts,

I need some help to understand why my column total (from measures) is wrong ?

 

TIA

 

 

 

  • Hi,

    By default the total calculation applies your measure logic to itself. It seems you are using RANKX here?
    To get around this issue you can create a new measure which has a custom logic for totals. 

    Example dax:

    Custom total rank =
    if(SELECTEDVALUE(Ranking[Employee])<>BLANK(),[Ranking],CALCULATE(SUMX(ALL(Ranking),[Ranking])))
     
    End result with the new measure in addition to the old [Ranking]:

    I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!

2 Replies

  • ValtteriN's avatar
    ValtteriN
    Community Champion

    Hi,

    By default the total calculation applies your measure logic to itself. It seems you are using RANKX here?
    To get around this issue you can create a new measure which has a custom logic for totals. 

    Example dax:

    Custom total rank =
    if(SELECTEDVALUE(Ranking[Employee])<>BLANK(),[Ranking],CALCULATE(SUMX(ALL(Ranking),[Ranking])))
     
    End result with the new measure in addition to the old [Ranking]:

    I hope this helps and if it does consider accepting this as a solution and giving the post a thumbs up!

  • Hi Anonymous 

     

    There are 2 watys to correct total value:

     

    1- Create a rank as a calculated column not a measure

    2- Use if and add different formula for total (same as ValtteriN  solution)

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/