Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Date values in the Future

Hello, 

 

I have 12 number of projects with different start/end time. 

 

I wanted to show a summary of what projects are iending in the next 30, 60 or 90 days. 

 

I built a date table using the following formula: Date = CALENDAR("2017-Jan-01", TODAY())

 

Then i build from that table to try and pull using the formula below: 

DatePeriod =
UNION (
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-07+1,today()) ), 'Date'[Date]),"Period","Last 14 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-14+1,today()) ), 'Date'[Date]),"Period","Last 14 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-30+1,today()) ), 'Date'[Date]),"Period","Last 30 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date' , DATESBETWEEN('Date'[Date],today()-90+1,today()) ), 'Date'[Date]),"Period","Last 90 Days") ,
ADDCOLUMNS( SUMMARIZE( CALCULATETABLE('Date'), 'Date'[Date]),"Period","Overall") )

 

However, the formula i found only had to pull the last 7,14,30 or 90 days, I was thinking of changing the negative to positive and change Last to Next. 

That didnt work. 

 

Do you know what i need to change on the formula above to give me the view of the next X days in the future? 

Or is there another formula I can use. 

 

thank you 

  • v-frfei-msft's avatar
    v-frfei-msft
    7 years ago

    Hi Anonymous ,

     

    Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

     

    Regards,
    Frank

2 Replies

  • v-frfei-msft's avatar
    v-frfei-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    To update your date table formula as below to make sure the dates like today+90 included in the date table. Then you can get the date values in the future as you excepted.

     

    Date = CALENDAR("2017-Jan-01", "2019-Dec-31")

    Regards,

    Frank

    • v-frfei-msft's avatar
      v-frfei-msft
      Icon for Community Support rankCommunity Support

      Hi Anonymous ,

       

      Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

       

      Regards,
      Frank