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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
fiorela
Helper I
Helper I

Refresh table

Hi All,

 

I'm having issue with refresh data. I've loaded a csv from "Get Data" , TXT/CSV. Then, from PowerQuery Editor, I have copied the original table and made changes. Now, if i change the file path, only update the original table, while the copy keeps the old path.

 

Any suggestion?

 

thanks!

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @fiorela 

In PowerQuery you can use a query as the source for another query.  For example, if you load a data table then you walso want to have another table of just the customer names and you extract that from the data you can just make another query that references the first and make your changes.

In my example I have a table called "data"

I have a second query where I have copied data and made some changes.  In the advanced editor I can change the source for mye "data updated" query from the orignal .csv to the data query.

 

Original query for "data update"

let
    Source = Csv.Document(File.Contents("C:\Data\data.csv"),[Delimiter=",", Columns=5, Encoding=65001, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Year Month", type date}, {"Sales Amount", type number}, {"Sales YTD", type number}, {"Sales R12", type number}, {"AVG R6", type number}}),
    #"Removed Top Rows" = Table.Skip(#"Changed Type",1),
    #"Filtered Rows" = Table.SelectRows(#"Removed Top Rows", each ([Sales Amount] <> null))
in
    #"Filtered Rows"

Updated query using "data" as my source.  Notice I did have to remove the "Promoted Headers" step.

let
    Source = data,
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year Month", type date}, {"Sales Amount", type number}, {"Sales YTD", type number}, {"Sales R12", type number}, {"AVG R6", type number}}),
    #"Removed Top Rows" = Table.Skip(#"Changed Type",1),
    #"Filtered Rows" = Table.SelectRows(#"Removed Top Rows", each ([Sales Amount] <> null))
in
    #"Filtered Rows"

 

 

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @fiorela 

In PowerQuery you can use a query as the source for another query.  For example, if you load a data table then you walso want to have another table of just the customer names and you extract that from the data you can just make another query that references the first and make your changes.

In my example I have a table called "data"

I have a second query where I have copied data and made some changes.  In the advanced editor I can change the source for mye "data updated" query from the orignal .csv to the data query.

 

Original query for "data update"

let
    Source = Csv.Document(File.Contents("C:\Data\data.csv"),[Delimiter=",", Columns=5, Encoding=65001, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Year Month", type date}, {"Sales Amount", type number}, {"Sales YTD", type number}, {"Sales R12", type number}, {"AVG R6", type number}}),
    #"Removed Top Rows" = Table.Skip(#"Changed Type",1),
    #"Filtered Rows" = Table.SelectRows(#"Removed Top Rows", each ([Sales Amount] <> null))
in
    #"Filtered Rows"

Updated query using "data" as my source.  Notice I did have to remove the "Promoted Headers" step.

let
    Source = data,
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year Month", type date}, {"Sales Amount", type number}, {"Sales YTD", type number}, {"Sales R12", type number}, {"AVG R6", type number}}),
    #"Removed Top Rows" = Table.Skip(#"Changed Type",1),
    #"Filtered Rows" = Table.SelectRows(#"Removed Top Rows", each ([Sales Amount] <> null))
in
    #"Filtered Rows"

 

 

 

you rock !! many many thanks 🙂

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.