March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
Solved! Go to Solution.
That's not as straigthforward as one would hope, unfortunatly:
Date.From(DateTime.LocalNow()) - [Date]
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
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.
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?
That's not as straigthforward as one would hope, unfortunatly:
Date.From(DateTime.LocalNow()) - [Date]
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |