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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
ChrisMajestic
Frequent Visitor

Any way to display warning if data is stale from a data source error?

I'm using Power BI Report Server in import mode for a few reports/dashboards and have them displayed on large monitors. These dashboards are used to display real-time data (within the last 5 minutes). I have a script that clicks the refresh button on the dashboard every minute to catch the background refresh and ensure that the visuals are constantly updated on the display.

 

I have a "Last Refresh" visual at the top of the dashboard which shows the last successful refresh. Is there any way to use HTML, pbiviz plugin, or some other method to compare last successful refresh time to the current system time when the refresh fails? I need a way for people to know that the data they're seeing is stale data because of a failure in refreshing from one of the data sources. As I understand it, the method would need to somehow have access to local system time as UTCNOW will have the last successful refresh time instead of the actual current system time.

6 REPLIES 6
ChrisMajestic
Frequent Visitor

Maybe I'm not explaining this correctly. "Last Refresh" is NOT meaningless. This is Report Server running in a dark site with no internet connection. Considering the fact that I'm using Import Mode and the data is refreshed every 5 minutes, "Last Refresh" shows the time of the last successful refresh which should always be within the past 5 minutes or so. Right now the only way I can tell that something is broken and the refresh isn't working is by seeing how far behind Last Refresh is compared to the actual current time. What I'm asking for is to compare "Last Refresh" to the actual system time (if it's even possible). This would allow me to show some sort of warning on the screen if Last Refresh lags far behind real time.

ChrisMajestic
Frequent Visitor

My I'm not explaining this correctly. "Last Refresh" is not meaningless. If the last refresh time is within the last 5 minutes, it indicates that the dashboard is refreshing properly. Remember, last refresh will be a timestamp from when the dashboard was refreshed, which will always be in the past. I'm looking for a way to compare last refresh (or any date within the data source) to the actual system time. Since I'm using import mode, UTCNOW is not actually "now". It's "now" according to the time it was when the last successful refresh occured. I'm trying to compare UTCNOW to the actual current system time of the system that is displaying the dashboard.

If the last refresh time is within the last 5 minutes, it indicates that the dashboard is refreshing properly. 

Dashboards don't refresh.  Semantic models refresh.

 

Sure, it indicates that the refresh works mechanically. But it says nothing about the freshness of the data.

Maybe me explaining everything I'm doing will help you understand my verbiage. I have a dashboard which shows network hosts that have issues. Data is pulled from multiple databases and I have a script that runs which clicks the "refresh" button every 60 seconds in the PBI web UI. The "Scheduled Refresh" is set to run every 5 minutes in the background. So in essence the dashboard should always show data which is no older than 6 minutes or so which is indicated by a visual which shows the "Last Refresh" on the dashboard.

Obviously I'm assuming that if the data was imported AT ALL, that the refresh was successful, and for my purposes this works well. If the refresh is unsuccessful, then Last Refresh will be older than 6 minutes. I'm importing from several data sources so it is very possible that a refresh could fail because of an error from one of those sources.

However, all of that is irrelevant. I'm just simply asking if there is a way to compare Last Refresh (or any other date/time) to current system time using javascript or some other 3rd party method. I don't believe it's possible to do natively PBI.

v-fenling-msft
Community Support
Community Support

Thanks for lbendlin's concern about this issue.

 

Hi, @ChrisMajestic 

Perhaps you just need to add a simple Measure to get there:

SystemTime = NOW()


Drag Measure to Card visual:

vfenlingmsft_0-1728617046359.png

 


Save and open Power BI Report Builder, click Refresh and it will automatically get the current system time:

vfenlingmsft_1-1728617098862.png

 


Even if the refresh fails, it will get the current system time:

vfenlingmsft_2-1728617173610.png

 

vfenlingmsft_3-1728617211379.png

 

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

"Last Refresh"  is largely meaningless. Find a datetime column in your actual data (like "Last Call Received timestamp") and display that instead.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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