Forum Discussion
DAX date today query
- Anonymous1 year ago
Many thanks, this helped me to fix it.
- 1 year ago
Please accept the correct answer as a Solution.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
The issue might be with the syntax of the Today() function. In DAX, the correct function to get today’s date is TODAY() without any parameters. Here’s how you can adjust your query:
VAR __DS0FilterTable4 =
KEEPFILTERS (
FILTER (
ALL ('SDT Clarity Tasks'[ETD]),
'SDT Clarity Tasks'[ETD] = TODAY()
)
)
This should correctly filter the ETD column to only include rows where the date is today.
If you continue to experience issues, make sure that the ETD column is formatted as a date and that there are no time components in the date values. If ETD includes time, you might need to use the TRUNC function to compare only the date part:
VAR __DS0FilterTable4 =
KEEPFILTERS (
FILTER (
ALL ('SDT Clarity Tasks'[ETD]),
TRUNC('SDT Clarity Tasks'[ETD]) = TODAY()
)
)
This will ignore the time part and compare only the date.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
- Anonymous1 year agoNot applicable
Many thanks, this helped me to fix it.
- saud9681 year agoMemorable Member
Please accept the correct answer as a Solution.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!