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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Dangar332
Super User
Super User

How to find next date using measure

Greetings,

I have following table. i would like to find next date of current date using measure .

I am calculate it using adding new column to table but i don't know how to calculate using mesure

 

 

Dangar332_2-1696071011525.png

 

 

in above figure i have nextdate which is new added column  .but i want same output using measure

 

nextdate =
var currentdate = stock[date]
return
 MINX(FILTER(stock,stock[date]>currentdate),stock[date])
 
1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Ok @Dangar332 
You can use the offset function:

next date offset =
CALCULATE(min('yortable'[Date]),OFFSET(+1,ALLSELECTED('yourtable'[Date]),ORDERBY('yourtable'[Date],ASC)))
Ritaf1983_0-1696084520660.png

more information about this function here :
https://www.youtube.com/watch?v=C3QY0DWts8w

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

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

5 REPLIES 5
Ritaf1983
Super User
Super User

Ok @Dangar332 
You can use the offset function:

next date offset =
CALCULATE(min('yortable'[Date]),OFFSET(+1,ALLSELECTED('yourtable'[Date]),ORDERBY('yourtable'[Date],ASC)))
Ritaf1983_0-1696084520660.png

more information about this function here :
https://www.youtube.com/watch?v=C3QY0DWts8w

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

 
Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

@Ritaf1983 ,

Thank you for guidance

Glad to help 🙂

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @Dangar332 
There are many methods to achieve this goal.

If you have a calendar table, you can use the generic Dax function nextday:
https://learn.microsoft.com/en-us/dax/nextday-function-dax

If not something like that :

next date = SELECTEDVALUE(your table[Date])+1
Ritaf1983_0-1696080947033.png

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

hi, @Ritaf1983  thanks for reply

 

i have different condition

let's consider below table

date
2/17/2023
2/25/2023
7/18/2023
8/9/2023
9/27/2023

 

let current date is 2/17/2023 then next date is 2/25/2023

let current date is 7/18/2023 then next date is 8/9/2023

let current date is 8/8/2023 then next date is 9/27/2023

 

these  same result done by adding new column but i want in new measure instead of new column

nextdate =
var currentdate = stock[date]
return
 MINX(FILTER(stock,stock[date]>currentdate),stock[date])   ----- these give me result as i want but i have to calculate in column but  i want in measure.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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