Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Filter PowerBI, current date + 31 days

Hey Hey Dear Community,

 

I have got a little question.
In the past i generated a filter, which filters on the current date.

 

Now i would like to add a little twist.
Instead of the current date, i would like to have the current date + 30 days.

 

#"Filtered Rows1" = Table.SelectRows(#"Reordered Columns", each [Eind datum] <= Date.From(DateTime.LocalNow())),

 

Does anybody know how to do this?

Thanks in advance,

5 Replies

  • adityavighne's avatar
    adityavighne
    Continued Contributor

    How can you get +30 days data? if you are taking the current date.

     

    You can do forecasting for the next 30 days on the basis of previous data.

     

    OR

     

    Date.From(DateTime.LocalNow())+30)

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hey  @adityavighne, 

       

      Thanks for your help.

      I am indeed searching for something like this:Date.From(DateTime.LocalNow())+30)

       

      But, unfortunately when i apply this i get an error.

       

      #"Filtered Rows1" = Table.SelectRows(#"Reordered Columns", each [Eind datum] <= Date.From(DateTime.LocalNow())+30),

       

      Expression.Error: We cannot apply operator + to types Date and Number.
      Details:
      Operator=+
      Left=27/05/2019
      Right=30