Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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,
Solved! Go to Solution.
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
Hi @joepath
Please try
Test =
SUMX (
FILTER (
ADDCOLUMNS (
CROSSJOIN ( VALUES ( user[full_name] ), VALUES ( city[name] ) ),
"@M1", [M1]
),
[@M1] >= 1
),
[@M1]
)
Thanks @tamerj1 for looking into this, seems working but performance is very slow can we do somthing about it?
And I have 3 col so should do like Crossjoin(values(Full_Name),values(city[name]), Country[code]) ?
Please try
Test =
SUMX (
CROSSJOIN ( VALUES ( user[full_name] ), VALUES ( city[name] ) ),
VAR M1 = [M1] RETURN IF ( M1 >= 1, M1 )
)
this will save the FILTER iteration but the price is paid by the IF condition. However, most probably it will be faster.
Tried this one, still taking lot of time to execute.
Its a multiplication of two measure from the Fact table.
its simple sum.
Hmm 🤔
can you please share a screenshot of your data model with relationships and advise which columns that are being summed.
And third column will be added like this, Crossjoin(values(Full_Name),values(city[name]), Country[code])?
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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
10 | |
10 | |
9 | |
7 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |