Forum Discussion
How to find second latest date after max date
Hi Dee ,
Please create a measure as below.
Measure =
VAR maxdate =
CALCULATE ( MAX ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )
RETURN
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] < maxdate )
)
For more details, please check the pbix as attached.
I tried all the mentioned solutions but I still get the same date different from the real second date.
- Anonymous6 years agoNot applicable
Dee - Is the column a Date/Time column? If so, this could be problematic. You can convert it to a date column in Power Query.
- Dee6 years ago
Helper III
I understand now, this only brings out one date, I should have phrased my question better, supposedly I have a column with different dates for different users how do I return second dates for them all?
The formula is actually correct for getting the max date(for anyone looking for just one) how do I get it in a column- Anonymous6 years agoNot applicable
Dee - If you create a Table Visual, and add People and this Measure, it should calculate the Measure for each People. The idea is that each Person is a filter which limits the data, and the Measure is calculated within that context.