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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Rusciano
Frequent Visitor

Adding new rows when refreshing

Hi Community,

 

I am about losing my head to solve the following issue. It would be very easy for members which usually use Power.Query but not for me that a never do it before (I have always used DAX !!!). 

 

I computed a very simple query = DateTime.LocalNow() in order to retrieve the last update data time. By clicking on "Refresh" button the date time update correctly. Thus, the issue is that the query overwrite the previous record. Consequently, I always have one column with  just one row. You can check the attached screen to clarify my status of art.

 

Conversly, my goal is to have one column with how many rows as the refreshes are

 

 

 

Immagine.png

 

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

Hi @Rusciano ,

 

You need to add a column or index column to show the position of the rows as below.

vxiaosunmsft_0-1670293434799.png

Then you can use Table.InsertRows in Power Query. Below is my formula, you can reference it.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUTLVNzTSNzIwMlKwsDIxszIxUYqNBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Dimension = _t, Date = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Dimension", Int64.Type}, {"Date", type datetime}}),
    Custom1 = Table.InsertRows(#"Changed Type",1, { [Dimension = 2, Date = DateTime.LocalNow()] })
in
    Custom1

 

Final output:

vxiaosunmsft_1-1670293573589.png

Then you can click the "Refresh" button. You can reference the following link.

Table.InsertRows - PowerQuery M | Microsoft Learn

 

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ xiaosun

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

Dear v-xiaosun-msft, thank you for your time, but unfortunely the query you suggested doesn't work since when I refersh the query does not add a new row recording the updated data time but it only overwrite the last data time record update.

 

To be clearer my issue is to have one column with how many rows as the refreshes are

 

Thank you in advance for your support.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.