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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sieed
Helper II
Helper II

Power BI.com manual refresh breaking visuals

I have create a calculated column which computes the "Minutes Since last refresh" and used a card to diaply this column.

 

Here's the calculate column formula: Num Mins Since last Refresh = datediff(Tablename(datetime), now(), minute). 

 

datetime is equal to  DateTimeZone.ToLocal(DateTime.AddZone(DateTime.LocalNow(),-5)). So it gives me central time. 

Now, when I do a "refresh now" in power bi web, the "Minutes Since Last Refresh" breaks and gives me the following error: 

Couldn't load the data for this visual
 
The query referenced calculated column 'TableName'[Num Mins Since Last Refresh] which does not hold any data because evaluation of one of the rows caused an error.
Please try again later or contact support. If you contact support, please provide these details.
 
I understand that power bi service uses some different time zone rather than the current local time. The questions is, what do I do to fix this? 
1 REPLY 1
v-huizhn-msft
Employee
Employee

Hi @sieed,

You want to convert UTC to local time, right? If it is, you can use the DateTimeZone.SwitchZone function to transfer them to same time Zone. Or you can use DateTimeZone.LocalNow().

Reference links.

Convert utc to local time zone using Power Query

Display Last Refreshed Date in Power BI


Best Regards,
Angelia

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors