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
I have a column called 'Date' and it has dates all the way till April 2021. I then created a measure called 'Latest Date' with the following formula:
Solved! Go to Solution.
@natasha519 do you mean this, pbix is attached
forTOPN =
IF (
'Table'[Date] = CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) )
|| 'Table'[Date]
= CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) ) - 365,
1,
0
)
I tried this:
@natasha519 can you try htis
Measure =
VAR LatestDate = CALCULATE(MAX('Table'[Date]), ALL('Table'))
VAR _x = IF (MIN('Table'[Date]) = LatestDate,LatestDate-365)
RETURN _x
I would want a 1 in the new column, so 1 for April 2020 and then 1 for April 2021, and the rest of the values would be 0
@natasha519 do you mean this, pbix is attached
forTOPN =
IF (
'Table'[Date] = CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) )
|| 'Table'[Date]
= CALCULATE ( MAX ( 'Table'[Date] ), ALL ( 'Table' ) ) - 365,
1,
0
)
@natasha519 did you have a chance to look into the solution I provided?
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 |
|---|---|
| 21 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 20 | |
| 13 | |
| 12 |