Showing results for 
Search instead for 
Did you mean: 
Tejaswini_Dahat Frequent Visitor
Frequent Visitor

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.  


Super User
Super User

Re: Need to return the date after First Date of the column

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" )
    CALCULATE ( MIN ( Table1[Date] ), Table1[Date] > FirstUnderProgress_, Table1[State Name] = "Under Progress" )




Tejaswini_Dahat Frequent Visitor
Frequent Visitor

Re: Need to return the date after First Date of the column

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

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 208 members 2,354 guests
Please welcome our newest community members: