Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

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