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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Raaz
Helper II
Helper II

Add row to a custome table after each refresh

Hi Community Experts,

 

I have a calculated measure. I want to write this measure to Power BI table(New Custome table)  with current system time hour after each refresh as a new row. i.e. when query is refreshed after every hour, the calculated measure should be inserted with the current hour as a new row. Is this possible in Power BI ?

 

Thanks for your help

7 REPLIES 7
Anonymous
Not applicable

Create a blank dataset then in the advanced editor 

 

let
Source = Table.FromValue(DateTime.LocalNow() ),
#"Renamed Columns" = Table.RenameColumns(Source,{{"Column1", "RefreshDate"}})
in
#"Renamed Columns"

 

this should store the value when the dataset is refreshed. 

 

YOu can also create new column in the existing table

 

Thanks for your reply.

 

Your solution is overwriting the previous records. I need to preserve each row with each hour and previous calculated measure.

 

Expected Output

 

Measure            Hour

12                          11                                           (i.e.11AM)

9                             12                                          (i.e. 12AM)

8                            13                                           (i.e.  1PM)

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

2                           17                                             (i.e. 5PM)

 

is this possible to update my table like this with each hourly refresh?

 

Thanks

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Raaz ,

 

take a look at the following concepts:

https://blog.crossjoin.co.uk/2020/04/13/keep-the-existing-data-in-your-power-bi-dataset-and-add-new-...

 

https://www.thebiccountant.com/2020/04/13/create-a-load-history-or-stage-in-cds-instead-of-increment...

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Very nice post!!!

 

I tried to edit this for my requirement which is incremental refresh by hour instaed of each day. But in the incremental refresh options, refresh rows gives choice for only days,month, quarter and year not hour. Is there any way to specify refresh row by hour ?( i am not talking about scheduling in powerbi.com but incremental refreh in power bi Desktop)

 

Thanks,

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Raaz ,

 

incremental refresh in Power Bi Desktop is not possible.

 

In the Power BI service, you must specify each execution time individually.

 

You can perform multiple dataset refreshes daily, which might be necessary if the underlying source data changes frequently. Power BI limits datasets on shared capacity (Power BI Pro) to eight daily refreshes. If the dataset resides on a Premium capacity, you can schedule up to 48 refreshes per day in the dataset settings.

https://docs.microsoft.com/en-us/power-bi/refresh-data#data-refresh

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Hi, @Raaz 

 

It is unavailable to directly insert a new row to a query generated previously. As a workaround, you may generate several queries and then append them together. 

 

You may click 'Edit Query', go to Query Editor, create a new blank query, click 'Advanced Editor', input codes as below.

 

 

(value as number)=>
let
NewDate = DateTime.LocalNow(),
Result = Table.FromRecords({[Value = value,Date = NewDate ]})
in
Result

 

 

c1.png

 

Then you may input value to generate a record with current datetime.

c2.png

c3.png

 

Finally you need to make one generated query selected, go to 'Home' ribbon, click 'Append Queries', set as below to add generated queries together.

c4.png

 

c5.png

 

Result:

c6.png

 

Best Regards

Allan

 

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

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Raaz 

 

this is not possible.

Measures are calculated at runtime.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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