Forum Discussion
joepath
Helper II
3 years agoSummarize stop working with Many to Many relationship
Hello,
I have the below measure which was working fine with 1:M relationship, but due to some requirement we need to convert the relationship to M:M.
now the measure stop working because its using SUMMARIZE function, and SUMMARIZECOLUMS is not working because I need to use it in tabular report.
How to convert this meausure so it can work with M:M relationship giving the same result in optimize way.
Test = SUMX(
FILTER(
ADDCOLUMNS(
SUMMARIZE(Fact,user[full_name],city[name]),
"@M1",[M1]
),
[@M1]>=1
)
,[@M1]
)
Thanks,
Please try
Test =
SUMX (
CROSSJOIN (
CROSSJOIN ( VALUES ( user[full_name] ), VALUES ( city[name] ) ),
VALUES ( country[country code] )
),
VAR M1 = [M1] RETURN IF ( M1 >= 1, M1 )
)but this will make it even slower