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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
frankhofmans
Helper IV
Helper IV

Search value of next date

hi all,

 

I have a table with omission percentages (of sick employees) and the start date. For example:

 

Case IDStart DateAbsenteeism percentage
C00110-04-2023100
C00125-04-202330
C00127-04-20230
C00215-04-2023100
C00220-04-202390
C00230-04-20230
   

 

I want to add a column with the end date. In the case of C001, the end date of the first row has to be 24-04-2023 (start date of next row -1), the end of the second row has to be 26-04-2023. In the third row, the end date has to be 27-04-2023 (same as the start date, because there is no "later" row of that caseID). Is there a opposite of the earlier function (my first instinct to solve this), or do you guys have another solution (plus formula)?

 

Many thanks in advance,

Regards,

Frank

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @frankhofmans 

 

You can try the following methods.

End Date = 
Var _nextdate=MINX(FILTER('Table',[Start Date]>EARLIER('Table'[Start Date])&&[Case ID]=EARLIER('Table'[Case ID])),[Start Date])
Return
IF(_nextdate=BLANK(),[Start Date],_nextdate-1)

vzhangti_0-1695954780121.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @frankhofmans 

 

You can try the following methods.

End Date = 
Var _nextdate=MINX(FILTER('Table',[Start Date]>EARLIER('Table'[Start Date])&&[Case ID]=EARLIER('Table'[Case ID])),[Start Date])
Return
IF(_nextdate=BLANK(),[Start Date],_nextdate-1)

vzhangti_0-1695954780121.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

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