Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI!
I cannot wrap my head around the following situation:
I have multiple measures, that require filtering by latest month and edate(latest month). That is why I decided to create one measure "Latest date"= MAX (Datetable[Date]) that would give me the latest date to use in FILTER.
However the strange thing is that, when the measure is written as MAX (Datetable[Date]) then it does not work in the filter. However, what it works if I write max(Datetable[Date]) directly in the filter or (even stranger), if I create another summarize date table and use the Date field from this in the "Latest date" measure.
Is there any explanation for this odd behaviour? Does not seem to be logical.
Where are you using the max date after that? That might push context.
var _maxdate = maxx(datetable,datetable[Date]) should work. But how it used in next formula , might have role in the context.
Using Var in the 'Latest date' measure does not work. However var with max(date) or just max(date) in the later measures works fine.
All the later measures are = CALCULATE (Measure, FILTER( Date= EDATE(Latest period,-/+x)) type.
I clarified this as a bug that happened during DimDate table creation.
- Trying to create same Date tables with same relationships allows the measure max(date) to be used in other measures.
- When I deleted the main DimDate table and renamed the DimDate2 table as DimDate then the bug happened again and the measure max (date) stopped filtering other measures.
Hi @Anonymous
try to use CALCULATE, like CALCULATE(MAX(Datetable[Date]))
It will enable row an filter context
do not hesitate to give a kudo to useful posts and mark solutions as solution
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |