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.
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!
Solved! Go to Solution.
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"
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 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |