Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have the following SQL Query:
SELECT * FROM [table1]
INNER JOIN (SELECT [table2].table1_id, [table4].table4_id, count(*)
FROM [table2]
INNER JOIN [table3] ON [table2].table3_id = [table3].table3_id
INNER JOIN [table4] ON [table4].table4_id = [table3].table4_id
GROUP BY [table2].table1_id) as <table5> ON [table1].table1_id = <table5>.table1_id
I need to do the same thing that does this but translated to DAX in order to use it in Power BI,
it would be great if i can use it in a measure, but i tried a few things that didn't work, so if it is a measure, calculated column or anything else would be nice.
I'm a little lost with with this. Any Ideas? Thank you very much!
NATURALINNERJOIN is the DAX join function and you can use SUMMARIZE for grouping.
I'm using :
Measure = CALCULATE(SUMMARIZE((NATURALINNERJOIN(<table2>;NATURALINNERJOIN(<table3>;<table4>)));"qty";count(<table2>[table1_id])))
But I Can't make it work.
This is my relationship model.
Hi @matgf,
SUMMARIZE function will return table, you can't direct use it in measure.
Regards,
Xiaoxin Sheng
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
89 | |
52 | |
45 | |
39 | |
38 |