Forum Discussion
natasha519
Helper II
4 years agoCreate Measure with LatestDate Minus 1 Year
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: LatestDate = VAR LatestDate = CALCULATE(MAX(Tab...
- 4 years ago
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
Helper II
4 years agoI 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
smpa01
Community Champion
4 years agonatasha519 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
)
- smpa014 years ago
Community Champion
natasha519 did you have a chance to look into the solution I provided?