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 DPCCGF
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
Rita, first thanks for your other solution. Regarding sharing of the data, how do I do that? Basically, I have the matrix below that can be drilled down on rows. Trying to get the Total Line to perform the following:
Gross Margin - Operating Expenses + Other Income - Other Expense. Right now by default it summarizes everything.
- Ritaf19831 year agoSuper User
Hi DPCCGF
According to sharing the file, you can save it in some public cloud and share via a link.
Regarding different logic for the total, in general, you can use functions like `ISINSCOPE` and `HASONEFILTER` to define a different calculation logic for the total row than what you have at the item level.
There is a video guide to how it works:
https://www.youtube.com/watch?v=xAZY9FyLDPoFor more specific assistance I need to see the pbix
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
- DPCCGF1 year agoHelper IV
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.
- DPCCGF1 year agoHelper IV
Here you go with the PBIX!
https://1drv.ms/u/c/399d0072dbb282f0/EaS4AaxTQK9HtPU5VA9MnwABotNsUC-sUHyyMkON4QhQJw?e=bpA9Vc
- Ritaf19831 year agoSuper User
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