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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

anmolmalviya05

Last Refresh Date in Power BI

Steps to Add Last Refreshed Date

Step 1: Open Power BI Desktop

Launch Power BI Desktop and click on the Transform Data option.

anmolmalviya05_0-1742208990701.png

 

Step 2: Create a Blank Query

From the Home ribbon, click on New Source and select Blank Query.

anmolmalviya05_1-1742209023415.png

 

Step 3: Rename the Query

Once the Blank Query table (named "Query1") appears under the Queries section, right-click on it and rename it to Last Refreshed Date.

anmolmalviya05_2-1742209035037.png

 

Step 4: Add M Code in Advanced Editor

Now, open the Advanced Editor from the Home ribbon and paste the following M code:

anmolmalviya05_3-1742209058173.png

 

M Code:

let
    Source = #table(type table[Date Last Refreshed=datetime], {{DateTime.LocalNow()}})
in
    Source

Once you paste the code, click on Done.

anmolmalviya05_4-1742209084770.png

 

This M code creates a column named Last Refreshed Date, containing the current date and time. The date will update every time you refresh the dataset.

Step 5: Apply Changes

Click on Close & Apply to save and apply the changes.

Step 6: Display Last Refreshed Date in the Report

To show the last refreshed date, you can use either:

  • A Card visualization

  • A Text Box, depending on the available space in your report.

    anmolmalviya05_5-1742209104365.png

     

Conclusion

Adding a last refreshed date detail in your Power BI report helps users understand data freshness and ensures that automatic refreshes are working as expected.

I hope you found this blog helpful! 🚀

 

Best Regards

Anmol Malviya 

Sr. Data Analyst | Addend Analytics

Comments