Read our blogs, tips and tutorials
Try our exercises or test your skills
Watch our tutorial videos or shorts
Take a self-paced course
Read our recent newsletters
License our courseware
Book expert consultancy
Buy our publications
Get help in using our site
546 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owl trainers only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Adding a last refresh date to Power BI reports |
---|
Add report refresh date |
Letting your users see when a report was last refreshed is a good idea. One way to do this is to create a query which calculates the current date and time each time the report is refreshed.
You can do this by choosing Home | Get data | Blank Query from the Power BI ribbon.
Choosing Blank Query will launch the Query Editor automatically.
You now need to type some code into the formula bar. Here I am entering DateTimeZone.FixedUtcNow to calculate the current date and time. Press Enter to finish the formula, then click Invoke to run the function.
Now you can click on Invoke to run the created function.
Power BI will return the current date and time and will update this each time the data refreshes.
Now you need to convert the result of the function into a table so that it can be loaded into the Power BI data model.
Choose this option from the Query Editor ribbon to convert the results into a table.
Now you should see a single column table containing the date and time. You can double-click the column header to rename it.
Enter a sensible name and press Enter.
Now you can change the data type to Date/Time by clicking the icon next to the column name and choosing the appropriate option.
Choosing Date/Time will apply your local date format.
Now you can load this new table into your data model.
Choose Close & Apply to import your data.
Now you can create a visual to display the date in, I recommend using a card.
Click the icon shown here to insert a card visual.
Finally you can add your new date into the visual.
Try refreshing your model and watch the time change!
Some other pages relevant to the above blog include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2024. All Rights Reserved.