cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Need help with getting the next 9 month date

Hi,

 

I have a date field and I need to identify the next multiple of 9 months since that date and it has to be after the current date, so for example:

 

Date = 9th March 2018

 

I need the next multiple of 9 months after this date after today, so:

 

it would be 9th Sept 2019. The first multiple of 9 months after the original date would be 9th Dec 2018 which is before today's date, so I have to add another 9 months until the date is after today.

 

My dates go back to 2002.

 

I have no idea where to start on this one. Has anyone got any ideas or has come across something similar at all?

 

Many thanks,

Andy

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Need help with getting the next 9 month date

Hi @Anonymous 

Assuming you have the date in a column Date in Table1, create a calculated column:

 

NewCol =
VAR Jumps_ =
    QUOTIENT ( DATEDIFF ( Table1[Date], TODAY (), MONTH ), 9 )
RETURN
    IF (
        EDATE ( Table1[Date], Jumps_ * 9 ) = TODAY (), //Check whether today is exactly 9N months away  
        TODAY (),
        EDATE ( Table1[Date], ( Jumps_ + 1 ) * 9 )
    )

 

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: Need help with getting the next 9 month date

Hi @Anonymous 

Assuming you have the date in a column Date in Table1, create a calculated column:

 

NewCol =
VAR Jumps_ =
    QUOTIENT ( DATEDIFF ( Table1[Date], TODAY (), MONTH ), 9 )
RETURN
    IF (
        EDATE ( Table1[Date], Jumps_ * 9 ) = TODAY (), //Check whether today is exactly 9N months away  
        TODAY (),
        EDATE ( Table1[Date], ( Jumps_ + 1 ) * 9 )
    )

 

View solution in original post

Highlighted
Anonymous
Not applicable

Re: Need help with getting the next 9 month date

Thanks @AlB , although I didn't use your exact solution (there were other issues as to why), part of it gave me an idea and I used some of it as part of the solution to get the result I needed. Thank you so much for replying and giving me that point in the right direction.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors