Forum Discussion
Find the second lowest value in Date Column
Hi community,
I have the following problem, I want to calculate the second lowest date in a Date type column. My data looks as follows:
I'd like to get the 01/09/2011 date, but I'm getting the 01/01/1000 instead.
This is the measure I'm trying, any idea where I have the error?
And this is the measure I get -->
Thanks for your help and time!
Hi Anonymous ,
Try the following formula:
second min date = VAR mindate = CALCULATE( MIN( 'Table'[column] ), ALLSELECTED( 'Table' ) ) RETURN CALCULATE( MIN( 'Table'[column] ), FILTER( ALL( 'Table'), 'Table'[column] > mindate ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- v-kkf-msft
Community Support
Hi Anonymous ,
Try the following formula:
second min date = VAR mindate = CALCULATE( MIN( 'Table'[column] ), ALLSELECTED( 'Table' ) ) RETURN CALCULATE( MIN( 'Table'[column] ), FILTER( ALL( 'Table'), 'Table'[column] > mindate ) )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.