Forum Discussion
Wrong column totals (table)
Hi, I've been trying to display a simple table with total values but I seem to have an issue.
My totals seem to be incorrect. What could be the issue here?
Very willing to provide more info if nescecary!
Screenshot of table: https://imgur.com/a/aMMjFri
("Min" and "Totale jaarlijkse besparing" are wrong)
Can you try this for MIN:
Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))
19 Replies
- HotChilliCommunity Champion
Welcome to the world of powerbi. The totals are actually correct, but they're not what you want.
- Greg_DecklerCommunity Champion
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- ikkewAdvocate I
I do have a measure in my table, so the problem you described in your post might be the issue.
I'll check out your suggested solutions and come back to this later.
Thanks in advance!
Edit:
I've been trying to make it work but I just can't wrap my head around how to implement the solution.
My "Min" column is the following measure:
Min = SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])
which I tried to convert as such:
MinT = IF( HASONEFILTER(ArtikelM[Huidig]), SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid]), SUMX( FILTER( ArtikelM, SUM(ArtikelM[Aantal]) > 0), SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid]) ) )But it's not working out for me.
And even if it worked, I have no idea what to do with the measure? Just replace "Min" with "MinT" in my case? - ikkewAdvocate I
Greg_Deckler I have updated my response, please take a look.
- v-piga-msftResident Rockstar
Hi ikkew,
I think the total value shows the result of the measure Min, do you want to show the sum of 37408.8+27144+26805+25968+25872?
If it is convenient, could you share some data sample which could reproduce your scenario so that I can copy and test.
In addition, I would appreciate it if you could share your desired output.
Best Regards,
Cherry
- themistoklisCommunity Champion
Try this:
Totale jaarlijkse besparing = CALCULATE(SUMX(ArtikelM, ArtikelM[Huidig]- ArtikelM[Min]) )
- ikkewAdvocate I
themistoklis Same as with the SUMX approach for the "Min" measure: the same result :mansad:
- themistoklisCommunity Champion
Can you try this for MIN:
Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))