Forum Discussion
Many to Many Measures
- 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.
Treatas function is taking long time to respond as my model is to heavy , Could you please try with another funtion ?
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.