Forum Discussion
Jyaul1122
11 months agoHelper III
Many to Many Measures
Hello, I have two tables Status and Address in relation with many to many via Project (status) and Project(address) column. I would like to get status of Project from Status table based o...
- 10 months ago
Hi Jyaul1122 ,
Thanks for reaching out to Microsoft Fabric Community.
I tested the scenario using the same sample data shared above.
Since TREATAS was causing performance issues in your model, here's an alternative approach using FILTER and IN, which avoids TREATAS and performs better in heavier models.
Here's the measure:
Status by Month = VAR SelMonth = SELECTEDVALUE('Status'[Month]) RETURN CALCULATE ( MAX('Status'[Status]), FILTER ( ALL('Status'), 'Status'[Month] = SelMonth && 'Status'[Project] IN VALUES('Address'[Project]) ) )Please find attached .pbix for reference and reach out for any further assistance.
Thank you.Thanks rohit1991 , mdaatifraza5556 and BernardBonto for your valuable inputs.
BernardBonto
10 months agoNew Member
Hi Jyaul1122,
Maybe this can help. I have created a date table from min and max date value and use it as a filter.
Table:
Date = GENERATESERIES(MIN('Status'[Month]), MAX('Status'[Month]))
Filter:
MonthYear = FORMAT('Date'[Date], "MMM-YYYY")
Measure:
Measure:
Max Status = COALESCE(MAX('Status'[Status]),"")
Jan-2025
Feb-2025
Mar-2025
Bernard