2020/03/17

Power BI - Add Data "Refresh Date and Time" to Report

Adding "Refresh Date and Time" to PBI Report



We all know that Power BI Reports can access data from source databases in two ways - Import, Direct Query.
With "Import" data will be imported into Power BI and will be refreshed periodically.  It will be beneficial for business to know when the data was last refreshed, without this information it might add confusion on the data accuracy.  
It is possible to add "Refresh Date" to Power BI Reports and the required process is as below:

#1 : Open the Power BI Report where the Refresh Date need to be added.

#2 : Open the "Edity Query" ,  select the table related to the report, and select "Advanced Editor" as below:
   
#3 In the "Advanced Editor", add below code as the last line, just before the "in" command as below:

In this :        
1
Step Name for adding Refresh Date, this can be any name
2
Previous Step Name from the Query
3
New Column Name to hold the "Refresh Date"
4
DAX Function to capture the Refresh Date and Time in UTC format
5
DAX Function to conver the the UTC Date & Time to Local Format
6
Last step name in the Query

#4 after "in" , replace the existing name which represents the last step in the Query. Save the changes

#5 Click "Close & apply" to commit the changes   










#6 You can verify the new column and its contents from the "Edit Query"




#7 Return to the Report Interface and add Card OR Tex Box to display the new column "Refresh Date"

     
#8 Adjust the Title , turn off "Category" and any other required changes



#9 Refres the Data and verify whether last Refresh Date



No comments:

Post a Comment

File Handling with Python

This little utility is for copying files from source to target directories.  On the way it checks whether a directory exists in the target, ...