Forum Discussion
Anonymous
7 years agoNot applicable
keep rows with dates older than
Hi,
I'm currently working on a report to show aged inventory and I want to only keep rows where the date is older than 3 days. There is a date filter to keep rows in the past n days but how do I remove rows in the past n days using M or DAX?
Thank you
That's not as straigthforward as one would hope, unfortunatly:
Date.From(DateTime.LocalNow()) - [Date]
3 Replies
- Greg_DecklerCommunity Champion
You can create a "DaysAgo" column very easily with something like: TODAY() - [Date] and then filter to <=3. For the M, I'm sure ImkeF knows how to do that.
- AnonymousNot applicable
Can you help me with a formula to add a custom column which returns the number of days between the [Date] column and the current date?
- ImkeFCommunity Champion
That's not as straigthforward as one would hope, unfortunatly:
Date.From(DateTime.LocalNow()) - [Date]