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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
megerwan
New Member

how to insert measure values into a table after each refresh (sheduled or not)

hello, 

 

i m getting crazy to find a solution to store datas in my dataset after each sheduled refresh !!

for a specific projet, my datasets are changing daily and i have a few  measures that i need to store after each refresh to keep historical values
so i d like to get a table  with such kind of  structure & value :

date, value_measure1, value_measure2......

And i d like to  insert a new row on a daily basis (sheduled refresh)  with the today'sdate and the measures values. 

 

with SQL ,  this is a easy "insert into %table% select (now(), measure1, measure2...)

 

but in Powerbi....   how to do that  and how to have it done automaticaly......?    i m not able to find a solution. 

 

thanks all for your support & help !!

1 ACCEPTED SOLUTION

Hi , @megerwan 

If you want to get the measure data in your visual after the dataset refresh.

If you only need the data , can you accrpt the snap image of the report , not a table.

If this, you can try to use the "Email Subscription" in the report to send an snap to your email after refreshing the dataset.

For more information, you can refer to :

Email subscriptions for reports and dashboards in the Power BI service - Power BI | Microsoft Learn

You can also use Power Automate to refresh the dataset and then you can configuire "export file to PDF" in Power Automate.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

9 REPLIES 9
v-yueyunzh-msft
Community Support
Community Support

Hi , @megerwan 

In Power BI Service, a refresh overwrites the previous data and doesn't save the original data.

And for measures, they are saved in formulas in our dataset, and they are calculated when they need to be calculated.

If you want to get the data in the corresponding visual, you can use the Export data feature.

For more information, you can refer to :

Export data from a Power BI visualization - Power BI | Microsoft Learn

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

thanks .  I check the export . it could be a manual option to export datas in a folder and reimport the folder at the next refresh.  but it s only manual 

 

thanks 

Hi , @megerwan 

If you want to get the measure data in your visual after the dataset refresh.

If you only need the data , can you accrpt the snap image of the report , not a table.

If this, you can try to use the "Email Subscription" in the report to send an snap to your email after refreshing the dataset.

For more information, you can refer to :

Email subscriptions for reports and dashboards in the Power BI service - Power BI | Microsoft Learn

You can also use Power Automate to refresh the dataset and then you can configuire "export file to PDF" in Power Automate.

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

vanessafvg
Super User
Super User

power bi is not a database, it is a modelling and visualisation tool.  Thefore it is not the place to create snapshots of your data because each time the source changes your data will get updated.  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




thanks.   yes . i don't want to create data snapshots just  keep some historical data for each dataset. 

maybe i will have to do that outside of powerbi but it's a pity to have to rebuild a SQL query/logic for the measure/calculated columns i have alraedy in powerbi. 

thanks for your help

Greg_Deckler
Super User
Super User

@megerwan Use goals and scorecards for this.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

thanks . i will check .   i was not aware of those goal/scorecards !! it seems to be interesting !!

daXtreme
Solution Sage
Solution Sage

No. Power BI does not like what you're trying to do. Tables should be structured differently in PBI. 

Instead of:

 

date | value_measure1 | value_measure2...

 

Such a table would have to expand to the right with more and more columns.

 

You should go for something different:

 

date | measure_name | measure_value

 

Such a table will not expand to the right. You will only add new rows and the table schema will be set in stone.

Good point. but how to insert the value in the table ?

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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