Forum Discussion

learner03's avatar
learner03
Post Partisan
5 years ago

Selecting data in Last 2 months and current day

I have a huge data but in the trasform, I want to filter data based on Job Close date. I want to have data of last 2 months including the current date. How can I do that?

This is because my Visualisation has cars that would show current day's data and the table beneath it will show last two months data.

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Table.SelectRows(PriorStepName, each [DateColumnName] >= Date.StartOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()), -2)) and DateColumnName <= Date.From(DateTime.LocalNow()))

     

    --Nate

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi learner03 ,

     

    You can filter data from the following

     

     

    Best Regards,

    Stephen Tao

     

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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi learner03 ,


    Sorry to disturb you...


    But did I answer your question ? Please mark my reply as solution. Thank you very much.

     

    Best Regards,
    Stephen Tao