Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anjali_mm
Frequent Visitor

Total wrong

Experts,

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

 

TIA

Anjali_mm_0-1641421068148.png

 

 

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

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]:
ValtteriN_0-1641422552062.png

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
VahidDM
Super User
Super User

Hi @Anjali_mm 

 

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/

 

 

ValtteriN
Super User
Super User

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]:
ValtteriN_0-1641422552062.png

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.