Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

DAX date today query

Hello everyone,

 

Within a step in a flow to Run a query against I dataset, I wish to just retrieve items from a column called ETD where the date is "today" but I am getting an error when I try to test this, so as a novice I expect the format is not quite right:

 

I think this is the part in question in the query:

 

VAR __DS0FilterTable4 =
KEEPFILTERS (
FILTER (
ALL ('SDT Clarity Tasks'[ETD] ),
'SDT Clarity Tasks'[ETD] = (Today ()),
)

 

Please can someone point me in the right direction ?

 

Many thanks

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Many thanks, this helped me to fix it.

View solution in original post

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!

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hi @Anonymous ,

I create a table as you mentioned.

vyilongmsft_0-1729476554251.png

It looks like the KEEPFILTERS function is causing an issue because it needs to be used within CALCULATE or CALCULATETABLE.

So I think you can change your codes.

EVALUATE
VAR __DS0FilterTable4 =
    CALCULATETABLE (
        FILTER ( ALL ( 'SDT Clarity Tasks'[ETD] ), 'SDT Clarity Tasks'[ETD] = TODAY () )
    )
RETURN
    __DS0FilterTable4

Then you will get what you want.

vyilongmsft_1-1729476783107.png

 

 

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

That's great, thank you

muhammad_786_1
Super User
Super User

Hy @Anonymous 

You can retrieve items from the ETD column where the date is "today" by using this simple solution in Power BI. You can just apply a visual-level filter using Relative Date Filtering.

muhammad_786_1_0-1729352352203.png

 

 

Best Regards,

Muhammad Yousaf

 

If this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.

 

LinkedIn

Anonymous
Not applicable

Thanks for your suggestion.

saud968
Super User
Super User

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!

Anonymous
Not applicable

Many thanks, this helped me to fix it.

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!

rohit10191
Frequent Visitor

Hi @Anonymous ,

Try adding the EVALUATE and RETURN keywords as shown below. Also, your syntax for the filter query seems incorrect. Please try this code : 

EVALUATE

VAR __DS0FilterTable4 =

KEEPFILTERS (
            FILTER (
                  ALL ('SDT Clarity Tasks'[ETD] ),
                  'SDT Clarity Tasks'[ETD] = Today ()
            )
)

RETURN
__DS0FilterTable4

 

Anonymous
Not applicable

Thank you

rohit10191
Frequent Visitor

Hi @Anonymous ,

Try adding the EVALUATE and RETURN keywords as shown below. Also, your syntax for the filter query seems incorrect. Please try this code : 

EVALUATE

VAR __DS0FilterTable4 =

KEEPFILTERS (
            FILTER (
                  ALL ('SDT Clarity Tasks'[ETD] ),
                  'SDT Clarity Tasks'[ETD] = Today ()
            )
)

RETURN
__DS0FilterTable4

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors