Forum Discussion

ItoDiaz's avatar
ItoDiaz
Helper I
5 years ago
Solved

Select previous month data

Dear All,    In this code, I need to select data of my previous month, it must take into account the case when my previous month is december.    I have tried using a selection of data of my Previ...
  • PC2790's avatar
    5 years ago

    Hello,

     

    If you have the date column with you, you can simple filter out the previous month's data as below:

    The corresponding M query code:

    = Table.SelectRows(#"Previous Step", each Date.IsInPreviousMonth([Date]))