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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
tuulia
Helper IV
Helper IV

Tabular Model Last_data_update to Power BI

Hi! How can I display the last refresh-date/time of SSAS tabular model in Power BI-report?

 

This query from model returns the correct result, but how can I make a measure from it:

 

SELECT TOP 1 [LAST_DATA_UPDATE]
FROM $System.MDSCHEMA_CUBES
WHERE [catalog_name] = 'my_model_name'
ORDER BY [LAST_DATA_UPDATE] DESC

 

Is there a way to create this "measure" in model or do I have to write the result of the query to SQL Server table first (and how to do it)?

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@tuulia , based on what I got. you need add the table and then you can get max using  measure like

 

maxx(all(Table), [LAST_DATA_UPDATE])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

v-luwang-msft
Community Support
Community Support

Hi @tuulia ,

The following article tells about how to extract data ,it may be helpful for you!

How to effectively extract data from an OLAP cube by relying upon T-SQL

 

 

Best Regards

Lucien

View solution in original post

6 REPLIES 6
v-luwang-msft
Community Support
Community Support

Hi @tuulia ,

The following article tells about how to extract data ,it may be helpful for you!

How to effectively extract data from an OLAP cube by relying upon T-SQL

 

 

Best Regards

Lucien

Thank you, this is very useful!

amitchandak
Super User
Super User

@tuulia , based on what I got. you need add the table and then you can get max using  measure like

 

maxx(all(Table), [LAST_DATA_UPDATE])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you, I think this is what I need. I just can't find the right solution to write mdx-query result to DW-table..

selimovd
Super User
Super User

Hey @tuulia ,

 

I would recommend to do that in Power Query. Like this whenever the data model is refreshed also the date and time is refreshed, so the user can see the real date/time of the last refresh.

Follow the first approach in the following article:

How to Add the Last Refreshed Date and Time to a Power BI Report (enhansoft.com)

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Thank you, but it's not possible to use Power Query when PBI is connected "live" to tabular model..

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.