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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Ltbabyj
Frequent Visitor

Power Automate email with Power BI data - need today's date (instead of report filter)

Hi all - I am a newbie to Power BI and certainly to Power Automate.  I have followed a couple of great YouTube videos on creating scheduled emails linking my Power BI reports however, I believe (but tell me if I'm wrong) that the Dax Query that I copied includes the filtered date and appears to be the reason why the data set is not refreshing with the scheduled emaill.  The Power BI report is functioning correctly which is to only pull the most recent 24 hours of data.  See below the Dax query.  

 

// DAX Query

DEFINE

VAR __DS0FilterTable =

FILTER(

KEEPFILTERS(VALUES('DailyLogManpower'[created_at])),

AND(

'DailyLogManpower'[created_at] >= (DATE(2024, 2, 1) + TIME(18, 57, 26)),

'DailyLogManpower'[created_at] <= (DATE(2024, 2, 2) + TIME(18, 57, 26))

)

)

 

 

I created this scheduled email on Friday (2/2).  Is there any way to replace the date shown above with a Dax coding for today()?

Thank you!

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Ltbabyj ,

Please try:

VAR __DS0FilterTable =
    FILTER(
        KEEPFILTERS(VALUES('DailyLogManpower'[created_at])),
		AND(
        'DailyLogManpower'[created_at] >= (UTCNOW() - 1)  , 'DailyLogManpower'[created_at] <= UTCNOW()
		)
    )

 You can decide which function to use based on the results returned by measure in the demo.

vcgaomsft_0-1707188085539.pngTODAY function (DAX) - DAX | Microsoft Learn
UTCNOW function (DAX) - DAX | Microsoft Learn
UTCTODAY function (DAX) - DAX | Microsoft Learn

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

View solution in original post

2 REPLIES 2
Ltbabyj
Frequent Visitor

Thank you!

Anonymous
Not applicable

Hi @Ltbabyj ,

Please try:

VAR __DS0FilterTable =
    FILTER(
        KEEPFILTERS(VALUES('DailyLogManpower'[created_at])),
		AND(
        'DailyLogManpower'[created_at] >= (UTCNOW() - 1)  , 'DailyLogManpower'[created_at] <= UTCNOW()
		)
    )

 You can decide which function to use based on the results returned by measure in the demo.

vcgaomsft_0-1707188085539.pngTODAY function (DAX) - DAX | Microsoft Learn
UTCNOW function (DAX) - DAX | Microsoft Learn
UTCTODAY function (DAX) - DAX | Microsoft Learn

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum -- China Power BI User Group

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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 Kudoed Authors