Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
How to make Fixed Totals & Subtotals?
Example (two identical matrix - just row order is different):
Problem: when I filter by year or product, subtotals are recalculated, but I want to see global fixed subtotals (by another words the same subtotals as on screen above)
Is it possible?
Solved! Go to Solution.
Possible Solution:
VolumeTotal(Fixed Totals) =
VAR isInSc_Prod = ISINSCOPE(dimSalesYearly[*idProduct])
VAR isInSc_Year = ISINSCOPE(dimSalesYearly[*Year])
VAR Result =
SWITCH(
TRUE(),
NOT isInSc_Prod && NOT isInSc_Year, CALCULATE(SUM(dimSalesYearly[VolumeTotal]), REMOVEFILTERS(dimSalesYearly[*idProduct],dimSalesYearly[*Year])),
NOT isInSc_Prod , CALCULATE(SUM(dimSalesYearly[VolumeTotal]), REMOVEFILTERS(dimSalesYearly[*idProduct])),
NOT isInSc_Year , CALCULATE(SUM(dimSalesYearly[VolumeTotal]), REMOVEFILTERS(dimSalesYearly[*Year])),
SUM(dimSalesYearly[VolumeTotal])
)
RETURN Result
P.S. I'd appreciate if you support "PowerQuery: Special symbol for previous step name" request feature you vote here or LinkedIn like/repost here.
Possible Solution:
VolumeTotal(Fixed Totals) =
VAR isInSc_Prod = ISINSCOPE(dimSalesYearly[*idProduct])
VAR isInSc_Year = ISINSCOPE(dimSalesYearly[*Year])
VAR Result =
SWITCH(
TRUE(),
NOT isInSc_Prod && NOT isInSc_Year, CALCULATE(SUM(dimSalesYearly[VolumeTotal]), REMOVEFILTERS(dimSalesYearly[*idProduct],dimSalesYearly[*Year])),
NOT isInSc_Prod , CALCULATE(SUM(dimSalesYearly[VolumeTotal]), REMOVEFILTERS(dimSalesYearly[*idProduct])),
NOT isInSc_Year , CALCULATE(SUM(dimSalesYearly[VolumeTotal]), REMOVEFILTERS(dimSalesYearly[*Year])),
SUM(dimSalesYearly[VolumeTotal])
)
RETURN Result
P.S. I'd appreciate if you support "PowerQuery: Special symbol for previous step name" request feature you vote here or LinkedIn like/repost here.
Hi @Anonymous ,
Thanks for sharing the solution. If the problem has been resolved, could you please mark your post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.
By the way, I just voted for your idea. It is a good idea, hope it can be realized in the near future.
Best Regards
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 11 | |
| 6 | |
| 5 |