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.
I have a calculated measure MFILTER that is a max date to filter out data after the desired reporting range in the table DATA. The DATA table that has the following fields:
| Employee | Client | Date | MonthEnd | Qty |
The following measure is being used in table to show prior month quantity by dept & employee in a matrix:
PMTotal = VAR PM = eomonth([MFILTER],-1) VAR CY = year([MFILTER]) RETURN calculate(sum(DATA[QTY]), filter(DATA, DATA[monthend]= PM &&year(DATA[monthend])=CY ) )
The measure is correct for active employees with hours, but if there was an employee in the dept with old records PMTotal is populating with a sum of the last records that employee has (i.e. ignoring the filter).
If I change the last part of the code to:
Year(DATA[MonthEnd]) = CY year(today())
The filter works and the employees with old data are excluded.
Any help/input on why the year filter is not working when referencing the VAR CY is appreciated.
What formula do you use to create MFILTER measure? Could you please share sample data of your table and post expected result here ?
Regards,
Lydia Zhang
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 |
|---|---|
| 31 | |
| 26 | |
| 23 | |
| 22 | |
| 15 |
| User | Count |
|---|---|
| 62 | |
| 47 | |
| 28 | |
| 24 | |
| 21 |