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
This should be really easy but I'm not getting it to work for reasons I can't figure out.
I have a dataset with different dates (DATE column) and I want to add a new column that puts a 1 on the rows with the max/last date on it otherwise 0.
Solved! Go to Solution.
Hi @dwel0120
Please try this measure:
Last Date =
VAR _MaxDate =
CALCULATE ( MAX ( FB_TOP_CONTRIBUTORS[DATE] ), ALL ( FB_TOP_CONTRIBUTORS ) )
RETURN
IF ( FB_TOP_CONTRIBUTORS[date] = _Maxdate, 1, 0 )
output:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @dwel0120
Please try this measure:
Last Date =
Var _MaxDate = calculate(max(table[DATE],all(table))
return
if(table[date]=_Maxdate,1,0)
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @dwel0120
Please try this measure:
Last Date =
VAR _MaxDate =
CALCULATE ( MAX ( FB_TOP_CONTRIBUTORS[DATE] ), ALL ( FB_TOP_CONTRIBUTORS ) )
RETURN
IF ( FB_TOP_CONTRIBUTORS[date] = _Maxdate, 1, 0 )
output:
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Thank you. That worked. I didn't see that I needed the ).
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 |
|---|---|
| 20 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 29 | |
| 21 | |
| 12 | |
| 12 |