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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply

Need to return the date after First Date of the column

Hello All,

Hope you all are doing alright, I want to return the next date after executing the FIRSTDATE() Dax function. I know there are two functions namely FIRSTDATE and LASTDATE but that does not fulfill my requirement. 

Kindly check the sample data below
Data snapshot.PNG
As you can see in the state name column there are 4 states for Under Progress having different dates for each. I want to return the date right after the first date of the state "Under Progress" i.e 8/16/2019. Your help is appreciated thank you.  

Cheers,

2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @Tejaswini_Dahat 

Is it a measure that you are looking for? If so, create this and place it in a card visual:

 

Measure =
VAR FirstUnderProgress_ =
    CALCULATE ( MIN ( Table1[Date] ), Table1[State Name] = "Under Progress" )
RETURN
    CALCULATE ( MIN ( Table1[Date] ), Table1[Date] > FirstUnderProgress_, Table1[State Name] = "Under Progress" )

 

 

 

Hello @AlB,

Actually, I am looking for a calculated column that will help me calculate the date difference in days for each stage. Most applications follows the stages Submitted -> Under Progress -> Pending -> Verified. Some applications may not follow every stage so it can vary (e.g An application may have gone through Submitted and Under Progress stages only). 

 

I'm attaching my calculated columns below the screenshot for your reference. Capture.PNG

 

Capture 2.PNG


The issue that I am facing here is that I am getting the negative date difference it's because it is taking the first date of the next stage.

For example, if I want to calculate the date difference for Submitted to Under Progress. In the above screenshot, you can see that it has calculated the negative date difference for the same even though there were two dates for "Under Progress" that were associated with the same application. I want it in such a way that lastvalue should take the second oldest date that'll help me solve the problem. 

Thanks for your kind attention. Smiley Happy

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors