Forum Discussion
previous month last month filter
Hello All
Looking at getting some help with hopefully a simple filter.
I have been using the basic filters for Data filtering and have been asked to provide seprate tables for last months and any information before last month. The "last month" is easy, i am struggling with everything before last month with out showing last month.
I am unfimilier with dax and can only use the built in functions.
hopefully this makes sense and hoping to get some help
I have managed to achieve this using the following;
each [Date Reported]<=Date.AddMonths(Date.From(Date.EndOfMonth(DateTime.LocalNow())),-2))
thank you for the help
4 Replies
- AnonymousNot applicable
Calculate(Sum(SomeTable[ColumnName]), Filter(WhateverTable, WhateverTable[Date] <= EOMONTH(TODAY(), -1)))
--Nate
- AnonymousNot applicable
Oh, your original post mentioned DAX. It's even easier in Power Query. In the formula bar:
= Table.SelectRows(Name of PriorStep, each [DateColumnName] <= Date.EndOfMonth(Date.AddMonths(Date.From(DateTime.LocalNow()), -2)))
--Nate