Forum Discussion
Matrix Summary Row Total
- 1 year ago
Thank you Rita, let me check the video. If it works great! If not I will send out the pbix file. Thank you for your solution on the other item as well.
- 1 year ago
Hi DPCCGF
You can create Dax formula like mine (Dividing by a million is only to reduce the cognitive load of dealing with too many digits; you can skip it if you'd like.)Bud_ =varbudget_ = sum('Balances'[Budget])varGross_ = CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Gross Margin"))VAROperating_ = CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Operating Expenses"))VarOther_ex = Operating_ = CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Other Expenses"))VAROther_in= CALCULATE(sum('Balances'[Budget]),FILTER('Balances','Balances'[Account Summary]="Other Income"))RETURNif(HASONEFILTER(Balances[Account Summary]),budget_,Gross_-Operating_-Other_ex+Other_in)/1000000Result :
The sample logic should be applied to all the measures.
The pbix is attachedIf this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Rita,
Can you help me determine why - when using your formula - getting incorrect totals when I have oddball numbers? Thanks!
Hi DPCCGF
The number in brackets is negative, the formula returns a correct result , - - = +:
If there's a need to override the accounting calculation, you can wrap the variables in the ABS function, which returns the absolute value. However, based on how it looks, it seems that an incorrect result will be produced.
https://learn.microsoft.com/en-us/dax/abs-function-dax
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly