This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
Hello,
I have 2 tables "sales" and "Type", with a many to many relationship (type).
The type Table has Type, SubType and Value columns
How can i do a measure that gets me this result by subtype, filtering Month = 3.
Thanks for your help, regards.
Solved! Go to Solution.
You can refer to the following DAX formula to create a measure, which creates a virtual table to merge tables Sales and Type, and returns the result you want.
Measure = VAR t = FILTER ( CROSSJOIN ( SELECTCOLUMNS ( Sales, "sale_type", [type], "id", [id], "month", [month] ), 'Type' ), [sale_type] = [Type] && [month] = 3 ) RETURN SUMX ( FILTER ( t, [SubType] = MAX ( [SubType] ) ), [Value] )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can refer to the following DAX formula to create a measure, which creates a virtual table to merge tables Sales and Type, and returns the result you want.
Measure = VAR t = FILTER ( CROSSJOIN ( SELECTCOLUMNS ( Sales, "sale_type", [type], "id", [id], "month", [month] ), 'Type' ), [sale_type] = [Type] && [month] = 3 ) RETURN SUMX ( FILTER ( t, [SubType] = MAX ( [SubType] ) ), [Value] )
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @v-juanli-msft ,
in this solution we dont need the "many to many" relationship?
@v-juanli-msft is there another solution
@v-juanli-msft wrote:Yes.
Best Regards
Maggie
using the logical relationship?
Thanks for your time!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 27 | |
| 25 | |
| 23 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 53 | |
| 46 | |
| 19 | |
| 19 | |
| 18 |