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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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?
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |