Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I'm trying to filter on a data set to have the date always be greater than or equal to the current date. Is there a variable that I can use, like 'DATE' or something like that?
Thanks!
Solved! Go to Solution.
Ah. You are in Power Query. The language used there is called "M", not DAX...no matter, we can make this right. Instead of TODAY(), use DateTime.LocalNow() where you edited it in the formula (you were on the right track) and all should be good. And you need to make sure that you balance the paranthesis, see error message in the pic you attached.
Hello
This works for me too - How do I add a number of days to today's date
I only want the data that is before today + 4 weeks (28 days)
or anything between today + 21 days and today + 28 days
I am using Date.AddDays (https://docs.microsoft.com/en-us/powerquery-m/date-adddays) but I get a SyntaxError (Expression.SyntaxError: Token RightParen expected.) and not sure how / where to fix
[Planned_Receipt_Date_Line] < (Date.AddDays(DateTime.LocalNow()), 28))
Thanks for your feedback
KalerDev
In DAX, TODAY() should do the trick.
I did try that, but I must be using it incorrectly. In the query editor, I am trying to create a dynamic filter to filter the column to everything after the current date:
So I tried to just enter a real date and tweak the DAX, but still didn't get it right (I had changed the column from date/time to date first):
Thanks for any help you can provide!
Ah. You are in Power Query. The language used there is called "M", not DAX...no matter, we can make this right. Instead of TODAY(), use DateTime.LocalNow() where you edited it in the formula (you were on the right track) and all should be good. And you need to make sure that you balance the paranthesis, see error message in the pic you attached.
That worked perfectly! Thank you for the solution - and for the clarification between DAX and Power Query. Still very new to this, and have a lot of learning to do! ![]()
My pleasure!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 63 | |
| 31 | |
| 30 | |
| 23 |