Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Filter data with last 15 months

Hello All, I want to filter data with last 15 months of data from max date Please help Thanks!
  • fahadqadir3's avatar
    2 years ago

    Anonymous  You can create a new Custom Column in Power Query to present months difference from Max Date Month by using the following Power Query Formula

    Date.Month([Date]) - Date.Month(List.Max(#"Sorted Rows"[Date])) + 
    (Date.Year([Date]) - Date.Year(List.Max(#"Sorted Rows"[Date]))) * 12

    Then apply a Filter on new column where months difference is greater than -15, so that only last 15 months data should be availble to use.

     

    Regards,

    Fahad Qadir

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!