Forum Discussion
Anonymous
4 years agoNot applicable
Second latest date with data
Hi, I have a measure that shows data from the latest possible day and it works as expected. Somehow I fail building a measure for the second latest date because it is always showing data for the...
- 4 years ago
Hi Anonymous
try this:
VAR _2nd = CALCULATE ( MAX ( 'Table'[timestamp] ), FILTER ( ALL ( 'Table' ), 'Table'[timestamp] < MAX ( 'Table'[timestamp] ) ) ) RETURN CALCULATE ( SUM ( 'Table'[count] ), 'Table'[timestamp] = _2nd )output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
VahidDM
Super User
4 years agoHi Anonymous
try this:
VAR _2nd =
CALCULATE (
MAX ( 'Table'[timestamp] ),
FILTER ( ALL ( 'Table' ), 'Table'[timestamp] < MAX ( 'Table'[timestamp] ) )
)
RETURN
CALCULATE ( SUM ( 'Table'[count] ), 'Table'[timestamp] = _2nd )output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!