Forum Discussion
DeBIe
4 years agoPost Partisan
How to get correct row total?
Hey all,
I've seen many posts online from people who experience this problem. I've been trying to implement other formulas to get this to work, but it isn't working for me. Please help.
I need the Income column to add up. I expect 31078(15380+15698).
My calculation:
Income = ('Table1'[Total Companies]) * (SUM(PriceTable[Price]))
Thanks for your time!
Hi, DeBIe
Here's an idea but it's a bit sloppy, but you can play with the Virtual Table to adjust it to your needs:Income = var Income = [Companies Original] * SUM('Table (2)'[Price]) var VirtualTable = SUMMARIZE('Table (2)','Table (2)'[Year], "Income", [Companies Original] * SUM('Table (2)'[Price])) var GetTotal = SUMX(VirtualTable, [Income] ) return IF ( HASONEFILTER('Table (2)'[Year]), Income,GetTotal)
2 Replies
- vojtechsimaSuper User
Hi, DeBIe
Here's an idea but it's a bit sloppy, but you can play with the Virtual Table to adjust it to your needs:Income = var Income = [Companies Original] * SUM('Table (2)'[Price]) var VirtualTable = SUMMARIZE('Table (2)','Table (2)'[Year], "Income", [Companies Original] * SUM('Table (2)'[Price])) var GetTotal = SUMX(VirtualTable, [Income] ) return IF ( HASONEFILTER('Table (2)'[Year]), Income,GetTotal)- DeBIePost Partisan