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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ShellyPC
Frequent Visitor

Display time since last refresh

Hi

 

I have a table in my dataset that contains a calculated field that is last refresh date and time.  This will be calculated every time the data is refreshed.  I display this on my report.  Now I have 2 virtually identical reports. One is set to refresh daily and the other is set to refresh quarterly.  We need the quarterly data to remain static for the whole of the next quarter.  (We have a use case where we want to see what the data looked like at the end of the last quarter).  However, I am worried that the users will confuse the two reports.  My users tend to ignore the last refresh date and simply accept the data they see as up to date.  I wanted to dynamiclly colour the display of the last refresh date and time, so that if the data is more than 24 hours old, it is big and red (or similar).

 

In fact, I would now like to add this to all my reports, so that no matter why the report contains old data, the users will be alerted that this data is old.

 

My first thought was to simply create a measure giving the number of hours (or days) between now() and last refresh date.  This works once, because nothing will cause that Dax measure to recalcuate after the first time.  It will only update when the data is refreshed.  

 

Is there any way I can force that measure to recalculate when a user opens the report?  Or any other way to calculate dynamically how long it has been since the last refresh?  Could I somehow fetch and use this data from the service?  

 

Any suggestions appreciated.

Thanks

3 REPLIES 3
danextian
Super User
Super User

Hi @ShellyPC ,

 

Unlike VBA, Power BI doesn't have event triggers that updates a particular measure, say, when you open it.  The only scenarios AFAIK when a measure updates it are when:

  • a user crossfilters (via visual elements) or fitlers (via slicers) but the moment you go back to the previous state the measure goes back to the previous state as well so that will only add confusion to the users
  • a user hits the refresh visuals icon on the upper right of the report in Power BI Service.

danextian_1-1701212470726.png

danextian_2-1701212481046.png

 

 










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Thanks for the input.  I think you are probably correct.  Before I mark your answer as the solution there is one more piece I want to investigate.

Using the Deneb visual with Vega, it is possible to put a ticking clock on the report.  I do not know however if it is possible to take the time from the clock and somehow use that to put up a message or change a color.  

I have never looked at Deneb before and until today, had never heard of Vega, so this will take some time.  I will come back here and post my findings.

Hi @ShellyPC 

 

Deneb is not my forte and since this is related to customizations using it, I would suggest you posted a separate topic so those who are more familiar with it could give you their suggestions.










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


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.