Forum Discussion
Wrong sub totals
Hi dears
I have calculated the cost per kg, wherein the total shows wrong figure.
In the above table, powercost per kg calculated as DIVIDE([power cost], [prod qty]).
Where there are no powr cost, the column power cost per kg shows blank and that is perfect.
But when it gives sub-total for all jobs of the customer - CHERISH KNITS - the sub total is wrong
that is showing 1.81.
When I filtered the above table, removing the rows where power cost is blank, I get the following
result.
The above filtered table, shows 2.19 which is correct.
I want to achieve the above result through a measure so that
I can give the power cost per kg in a card visual without giving the above filtered table.
Your help is much appreciated. Thanks.
2 Replies
- Ritaf1983
Super User
Hi Thulasiraman
Generally, there are a few methods to fix the totals, for example, refer to the linked tutorial :
https://www.youtube.com/watch?v=dgwsk2fjWLcfor a more specific solution, please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- Greg_Deckler
Community Champion
Thulasiraman First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8