Forum Discussion
Help with Totals
Hello, I am having trouble calculating the total of my column in one of the tables, I have this measure that does a multiplication between other two measures, because of that, the total of that column is not the sum of all the values on the column, instead it multiplies the total of the two measures used, but because of that the outcome is wrong.
The Measure "30 Dias Custo" is the one I'm talking about, it multiplies "Custo" by "30 Dias Qtde" and gives that result, but I wanted the sum of the values on the Column "30 Dias Custo".
This is the "30 Dias Custo" Measure:
This is "Custo" Measure:
This is "30 Dias Qtde" Measure:
Is there a way to make "30 Dias Custo" show the sum of its column values?
JoaoPedroSCC you need to use SUMX
30 Dias Custo = SUMX ( VALUES ( Table[Column Name You are showing on rows] ), [Custo] * [30 Dias Qtde] )JoaoPedroSCC What parry2k said but a little extra info:
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
3 Replies
- parry2kSuper User
JoaoPedroSCC you need to use SUMX
30 Dias Custo = SUMX ( VALUES ( Table[Column Name You are showing on rows] ), [Custo] * [30 Dias Qtde] ) - Greg_DecklerCommunity Champion
JoaoPedroSCC What parry2k said but a little extra info:
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 - parry2kSuper User
JoaoPedroSCC Read all the links Greg_Deckler provided to get your understanding clear on why it is not working.