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
- HotChilli
Community Champion
Welcome to the world of powerbi. The totals are actually correct, but they're not what you want.
- Greg_Deckler
Community 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- ikkew
Advocate 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? - ikkew
Advocate I
Greg_Deckler I have updated my response, please take a look.
- v-piga-msft
Resident 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
- themistoklis
Community Champion
Try this:
Totale jaarlijkse besparing = CALCULATE(SUMX(ArtikelM, ArtikelM[Huidig]- ArtikelM[Min]) )
- ikkew
Advocate I
themistoklis Same as with the SUMX approach for the "Min" measure: the same result :mansad:
- themistoklis
Community Champion
Can you try this for MIN:
Min = SUMX(VALUES(Artikel[ArtikelId]), CALCULATE(SUM(ArtikelM[Aantal]) * MIN(ArtikelM[MinEenheid])))