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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to stop refresh on power BI website

Hi, I published a dashboard on the power BI webstie. There are some dax using today() function. So, when it comes to a new month, the data will auto change to a new month data, which is blank because I havn't refreshed on dataset. How can I stop this refresh and only showing the data like I published last time until I update the dataset.

1 ACCEPTED SOLUTION
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

If I udnerstand correctly you can do the following.

 

Please create a calculated table with the following Code:

Mikelytics_6-1669910829770.png

Calculated Tables are only updated during dataset refresh which means you now get in the table the date of the last refresh. you can on top of this table create the following measure which you can use for all further calculations.

Mikelytics_7-1669910907990.png

 

 

 

M_LAstRefresh = SELECTEDVALUE(P_LastRefresh[Value])

 

So now your reference date will everytime be the date of the last refresh and when you dont refresh then you get the last available data.

 

For sure this means you have to stop the refresh when no data are available. If sthis does not work then you need to go with another approach where you check with a measure based on a specific criteria (e.g. are specific data vailable?) whether you want to go with TODAY() or with a past date.

 

Best regards

Michael

-----------------------------------------------------

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

 

 

 

 

 

 

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

View solution in original post

1 REPLY 1
Mikelytics
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

If I udnerstand correctly you can do the following.

 

Please create a calculated table with the following Code:

Mikelytics_6-1669910829770.png

Calculated Tables are only updated during dataset refresh which means you now get in the table the date of the last refresh. you can on top of this table create the following measure which you can use for all further calculations.

Mikelytics_7-1669910907990.png

 

 

 

M_LAstRefresh = SELECTEDVALUE(P_LastRefresh[Value])

 

So now your reference date will everytime be the date of the last refresh and when you dont refresh then you get the last available data.

 

For sure this means you have to stop the refresh when no data are available. If sthis does not work then you need to go with another approach where you check with a measure based on a specific criteria (e.g. are specific data vailable?) whether you want to go with TODAY() or with a past date.

 

Best regards

Michael

-----------------------------------------------------

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your thumbs up!

@ me in replies or I'll lose your thread.

-----------------------------------------------------

LinkedIn

 

 

 

 

 

 

 

 

------------------------------------------------------------------
Visit my blog datenhungrig which I recently started with content about business intelligence and Power BI in German and English or follow me on LinkedIn!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.