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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jeanxyz
Impactful Individual
Impactful Individual

how to create a card to show specific datetime

Hi,

 

I have created a card to show the time the report is lastly refreshed. As the data is refreshed by gateway at 11 am everyday, I have written a measure as below

 

Last Refresh Date = if(utcnow<= today() + time(11,0,0),
today()-1+time(11,0,0),
today()+time(11,0,0))
 
I got an error message. Thanks for help.
2 ACCEPTED SOLUTIONS
ryan_mayu
Super User
Super User

@Jeanxyz 

maybe try add brakets after utcnow

Last Refresh Date = if(utcnow()<= today() + time(11,0,0),
today()-1+time(11,0,0),
today()+time(11,0,0))

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

@Jeanxyz 

it's under the measure tool

1.PNG

are you using the latest pbi version?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Jeanxyz 

maybe try add brakets after utcnow

Last Refresh Date = if(utcnow()<= today() + time(11,0,0),
today()-1+time(11,0,0),
today()+time(11,0,0))

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Jeanxyz
Impactful Individual
Impactful Individual

Thank you! It works!

When I try to add this measure to a card, it shows output in date format, instead of datetime format. How can I fix this? I tried to set format as datatime general pattern in the modeling view, but it doesn't give me the format expected.

@Jeanxyz 

try to change a format which displays date and time.

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Jeanxyz
Impactful Individual
Impactful Individual

How do you get the datetime format in the dropdown list? I don't find it on my screen.

 

datetime format.png

@Jeanxyz 

it's under the measure tool

1.PNG

are you using the latest pbi version?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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