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 have a dataset for which for some dates, the latest values are missing, for example:
date value1 value2
1/1/2021 3 4
2/1/2021 2 2
3/1/2021 3 6
4/1/2021 7
Now I need to get the dates belonging to each last nonblank value. So to be clear: I don't want the value but the date.
So I need:
LastDateValue1 = 3/1/2021
LastDateValue2 = 4/1/2021
I tried creating a DAX measure for this with but I can't get it to work. Could anyone please help? Thanks so much!
Solved! Go to Solution.
@PunchBird , Create two measures like
maxx(filter(Table, not(isblank(Table[Value1]))),Table[Date])
maxx(filter(Table, not(isblank(Table[Value2]))),Table[Date])
Hi @PunchBird ,
Here are the steps you can follow:
1. Create measure.
LastDateValue1 =
IF(MAX('Table'[Value1])=BLANK(),
MAXX(FILTER(ALL('Table'),'Table'[Value1]<>BLANK()&&'Table'[date]<=MAX('Table'[date])),[date]),
MAX('Table'[date]))LastDateValue2 =
IF(MAX('Table'[Value2])=BLANK(),
MAXX(FILTER(ALL('Table'),'Table'[Value2]<>BLANK()&&'Table'[date]<=MAX('Table'[date])),[date]),
MAX('Table'[date]))
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
It's weird because when I test this I still get 4/1/2021 for value1. The solution also looks a bit cumbersome, compared to what @amitchandak proposed above. But thanks anyway for your help!
Try:
LastDateValue1 =
MAXX (
FILTER ( Table, NOT ( ISBLANK ( SUM ( Table[Value1] ) ) ) ),
Table[Date]
)
and
LastDateValue2 =
MAXX (
FILTER ( Table, NOT ( ISBLANK ( SUM ( Table[Value2] ) ) ) ),
Table[Date]
)
Proud to be a Super User!
Paul on Linkedin.
Hi, thanks! I tested this one but it didn't work... I get 4/1/2021 for both values, which isn't correct
@PunchBird , Create two measures like
maxx(filter(Table, not(isblank(Table[Value1]))),Table[Date])
maxx(filter(Table, not(isblank(Table[Value2]))),Table[Date])
@Anonymous thanks, this worked, exactly what I needed!
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 |
|---|---|
| 101 | |
| 76 | |
| 56 | |
| 51 | |
| 46 |