Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
radu92
Helper I
Helper I

Find the next higher value after MIN

Hi everyone, 

 

I have the following dataset: 

 

Case Nr. IncidentDate
1

randomstring

1.1.2016
1randomstring2.1.2016
1randomstring5.1.2016
2randomstring3.1.2016
2randomstring...
3randomstring...
4randomstring...
4randomstring...
4randomstring...

 

I would like to group this table by case nr., and choose the 2nd date after the earliest one. 

Any ideas how I can do this? 

 

Thanks in advance! 

1 ACCEPTED SOLUTION
Thiyags
Helper II
Helper II

@radu92

Is this wat you are expecting.

You can use the below formual

2ndMinDate = CALCULATE(MIN(Sheet6[Date].[Date]), filter(Sheet6, Sheet6[Date].[Date]<>MIN(Sheet6[Date])))

 

Capture.PNG

View solution in original post

3 REPLIES 3
Thiyags
Helper II
Helper II

@radu92

Is this wat you are expecting.

You can use the below formual

2ndMinDate = CALCULATE(MIN(Sheet6[Date].[Date]), filter(Sheet6, Sheet6[Date].[Date]<>MIN(Sheet6[Date])))

 

Capture.PNG

Thanks! This is exactly what I've been looking for. Do you know how I can make this a column instead of a measure? Like having a column with this value for all case numbers? 

@radu92

 

I am not sure.

 

But there is a video in the below link on columns vs measures

 

https://projectbotticelli.com/knowledge/dax-calculated-columns-vs-measures-video-tutorial

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.