Forum Discussion
Card total/table total doesn't match with the data
- 2 years ago
Hi,
You will have to use the SUMX() function as a measure.
Total = sum(Data[Revenue])
Measure = SUMX(VALUES(Data[Product]),[Total])
Hope this helps.
- Anonymous2 years ago
Hello,Ritaf1983 and Ashish_Mathur ,thanks for your concern about this issue.
Your answers are excellent!
And I would like to share some additional solutions below.
Hi,Deelip .I am glad to help you.I think you can try Ashish_Mathur's suggestion.
Total columns ending up with incorrect calculations is a common problem in Power BI.
The possible reasons are as follows:
The column/row total has no context due to the lack of context, plus the calculation logic in the dax code itself is not simply a direct use of a single aggregation function, e.g.column_test =SUM('Table'[column]); measure_test=MAX('Table'[column]);
In general, this directly use a power BI aggregation function, Total column display data will also be directly using the calculation logic are data for aggregation operations.
If you use the summarize function and redefine a series of calculation environments in it, then the Total column in visual may not return the correct value.You can try to create some calculation logic simple measure to replace the original error data.
For example, using the SUMX functionIf you can share the pbix file which does not contain sensitive data and the corresponding code, then this will help you to solve your problem.
If you are unable to share your data file, hopefully the following articles will help.
URL:Why Power BI totals might seem inaccurate - SQLBI
How to Fix Incorrect Totals in Power BI Tables (databear.com)
Solved: Help with incorrect totals in table and card visua... - Microsoft Fabric Community
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for reviewing my quesiton and providing your solution on this. I got this fixed.
You are welcome.