Forum Discussion
Anonymous
5 years agoNot applicable
Power BI - Matrix Totals
Hello,
I have a table called dim layer and another called dim class. I have set up a measure called
Expiring Structure Class = IF (
SELECTEDVALUE ( DimLayer[LayerName] ) = "3.5m xs 1.5M",
"Syndicate",
IF (
SELECTEDVALUE ( DimLayer[LayerName] ) = "4M xs 1M",
"Europe",
IF (
SELECTEDVALUE ( DimLayer[LayerName] ) = "",
"",
"Combined"
)
))
and another called
Option Structure Premium Ceded = VAR PremiumCededEurope =
CALCULATE (
SUMX(FILTER(DimClass, DimClass[ClassName] = "Nordics"
|| DimClass[ClassName] = "Spain"
|| DimClass[ClassName] = "Germany"), [PremiumCeded])
)
VAR PremiumCededSyndicate =
CALCULATE (
SUMX(FILTER(DimClass,DimClass[ClassName] = "Syndicate"),[PremiumCeded]))
RETURN
IF (
[Expiring Structure Class] = "Syndicate",
PremiumCededSyndicate,
IF (
[Expiring Structure Class] = "Europe",
PremiumCededEurope,
SUMX(DimClass,[PremiumCeded]))
) but putting these into a matrix does not produce the right totals as it ignores the class filters and sums up Premium Ceded for the filtered layers. Is there any way i can produce the right totals.
Kindly help.
Thanks
Shreya
2 Replies
- Greg_Deckler
Community Champion
Anonymous 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 - AnonymousNot applicable
Anonymous
Too many formulas to follow, you can share a sample pbix.Paul Zheng _ Community Support Team