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,
Every time when I open my report in Power BI Desktop I get the message: 'there are pending changes in your queries that haven't been applied', even though I did apply and save them before I closed the report.
I searched on this forum and it was suggested to disable the preview feature 'Store datasets using enhanced metadata format', but this is no longer possible because it's not a preview feature anymore.
I reproduced the query in a different pbix file and the same error occurs, so I have a suspicion it has something to do with the way I import the data from a SharePoint folder. Below is the M code:
let
Source = SharePoint.Files("https://this is a sharepoint folder/", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Statistics") and Text.EndsWith([Name], ".xlsx")),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Date modified", Order.Descending}}),
#"Kept First Rows" = Table.FirstN(#"Sorted Rows",1),
#"Filtered Hidden Files1" = Table.SelectRows(#"Kept First Rows", each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File", each #"Transform File"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File", Table.ColumnNames(#"Transform File"(#"Sample File"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"Year", Int64.Type}, {"Week", Int64.Type}, {"Numbers", Int64.Type}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Source.Name"})
in
#"Removed Columns"
Anyone any suggestions? This is driving me nuts.
Thanks!
Solved! Go to Solution.
Hi all,
I think I found the issue... it has something to do with the parameter that needs updating, hence the message. I removed the parameter from the query like this and it seems to work, no message anymore regarding pending changes. For anyone who's encountering the same issue - I replaced the code with this, see below:
let
Source = SharePoint.Files("https://this is a sharepoint folder/", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Statistics") and Text.EndsWith([Name], ".xlsx")),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Date modified", Order.Descending}}),
#"Kept First Rows" = Table.FirstN(#"Sorted Rows",1),
Navigation1 = #"Kept First Rows"{0}[Content],
#"Imported Excel" = Excel.Workbook(Navigation1),
Table2_Table = #"Imported Excel"{[Item="Table2",Kind="Table"]}[Data]
in
Table2_Table
Hi all,
I think I found the issue... it has something to do with the parameter that needs updating, hence the message. I removed the parameter from the query like this and it seems to work, no message anymore regarding pending changes. For anyone who's encountering the same issue - I replaced the code with this, see below:
let
Source = SharePoint.Files("https://this is a sharepoint folder/", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each Text.StartsWith([Name], "Statistics") and Text.EndsWith([Name], ".xlsx")),
#"Sorted Rows" = Table.Sort(#"Filtered Rows",{{"Date modified", Order.Descending}}),
#"Kept First Rows" = Table.FirstN(#"Sorted Rows",1),
Navigation1 = #"Kept First Rows"{0}[Content],
#"Imported Excel" = Excel.Workbook(Navigation1),
Table2_Table = #"Imported Excel"{[Item="Table2",Kind="Table"]}[Data]
in
Table2_Table
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |