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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all
I want to know if it's possible with Power BI to have a measure that returns me a the earliest date where the hours is different than zero .
For example I have this table:
The desired result would be:
I tried the following dax:
Most Recent Date With Hours <> 0 =
MAXX(
FILTER(
'Hours by line - Official',
'Hours by line - Official'[Upcoming New Line? (Yes/No)] = "Yes"
&& 'Hours by line - Official'[Available Production Hours] <> 0
),
'Hours by line - Official'[Date]
)
However the result with the measure above is giving me December 2024 only.
Any idea how could I get it right?
Thanks.
Solved! Go to Solution.
MinDate =
VAR _t = MAX( 'Hours by line - Official'[Manufacturing plant] )
VAR _tbl =
FILTER(
ALL( 'Hours by line - Official' ),
'Hours by line - Official'[Manufacturing plant] = _t
&& 'Hours by line - Official'[Upcoming New Line? (Yes/No)]
= "Yes"
&& 'Hours by line - Official'[Available Production Hours] <> 0
)
RETURN
CALCULATE( MIN( 'Hours by line - Official'[Date] ), _tbl )
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Hi @Ahmedx
Thanks a lot. Could it be possible to have the dax measure returning the earliest date instead of a 1 or 0?
Thanks!
MinDate =
VAR _t = MAX( 'Hours by line - Official'[Manufacturing plant] )
VAR _tbl =
FILTER(
ALL( 'Hours by line - Official' ),
'Hours by line - Official'[Manufacturing plant] = _t
&& 'Hours by line - Official'[Upcoming New Line? (Yes/No)]
= "Yes"
&& 'Hours by line - Official'[Available Production Hours] <> 0
)
RETURN
CALCULATE( MIN( 'Hours by line - Official'[Date] ), _tbl )
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 |
|---|---|
| 57 | |
| 44 | |
| 42 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 183 | |
| 114 | |
| 93 | |
| 62 | |
| 45 |