Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
Is there a way to refresh one Power Query instead of them all loading? At the minute I have one query that can't be refreshed because we haven't completed a CI yet this month and so there's no data there to show/load, (this is fine) but it's cancelling all the other queries from refreshing
Thanks
Charlotte
Solved! Go to Solution.
Hi @Anonymous ,
I think, in this instance, you would set up an alternate source that will refresh instead of your main source if there is an error with it such as you describe.
You would implement this in the M code something like the following, where you substitute in a created table that will refresh in the event of main source error:
let
//This is the original code generated by Power Query
Source =
Csv.Document(File.Contents("C:\Users\Chris\Documents\SampleData.csv"),null,",",null,1252),
#"First Row as Header" = Table.PromoteHeaders(Source),
#"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",
{{"Month", type text}, {"Product", type text}, {"Sales", Int64.Type}}),
//End of original code
//Define the alternative table to return in case of error
AlternativeOutput=#table(type table [Month=text,Product=text,Sales=Int64.Type],
{{"Error", "Error", 0}}),
//Does the Source step return an error?
TestForError= try Source,
//If Source returns an error then return the alternative table output
//else return the value of the #"Changed Type" step
Output = if TestForError[HasError] then AlternativeOutput else #"Changed Type"
in
Output
Credit for this goes to Chris Webb, and the full solution can be viewed on his blog here.
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
Please let us know if the replies above are helpful.
If they are, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If not, please give us more details.
Best Regards,
Icey
@Anonymous ,
In POwer Query, You can just open your table --> Home --> Click on small down arrow on "Refresh Preview" --> Click on Refresh Preview instead of Refresh All.
OR
In PBI Desktop, Click on 3 dots on any table from Right most Field Pane, Click "Refresh Data".
Hi Charlotte,
If you're refreshing the query in desktop you can go to the individual table/query name, click on the 3 dots and select 'Refresh data'.
Can use this instead of the Refresh button in the top menu.
Jo
Hi Jo, Thanks for this, the problem I then have is when I try to click apply and close in power query, it won't update it in PowerBi because one of queries can't load any data. Is there a way around this? I had thought that refreshing individually might do it
Hi @Anonymous ,
I think, in this instance, you would set up an alternate source that will refresh instead of your main source if there is an error with it such as you describe.
You would implement this in the M code something like the following, where you substitute in a created table that will refresh in the event of main source error:
let
//This is the original code generated by Power Query
Source =
Csv.Document(File.Contents("C:\Users\Chris\Documents\SampleData.csv"),null,",",null,1252),
#"First Row as Header" = Table.PromoteHeaders(Source),
#"Changed Type" = Table.TransformColumnTypes(#"First Row as Header",
{{"Month", type text}, {"Product", type text}, {"Sales", Int64.Type}}),
//End of original code
//Define the alternative table to return in case of error
AlternativeOutput=#table(type table [Month=text,Product=text,Sales=Int64.Type],
{{"Error", "Error", 0}}),
//Does the Source step return an error?
TestForError= try Source,
//If Source returns an error then return the alternative table output
//else return the value of the #"Changed Type" step
Output = if TestForError[HasError] then AlternativeOutput else #"Changed Type"
in
Output
Credit for this goes to Chris Webb, and the full solution can be viewed on his blog here.
Pete
Proud to be a Datanaut!
Hi Charlotte,
I think you can update the individual query in the desktop window instead of in the query editor window.
Jo
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |