Forum Discussion
Excel data source name change
- Anonymous9 years ago
Matthias93 As long as it's just the name of the Excel file, then you shouldn't have any issues making the change as you describe.
If you are really converned about the PBIX, you can just "Save As" a copy of it and "test" the connection change with both files in the data source location.
- 9 years ago
Hi Matthias93,
Yes, you can do that. but just ensure 2 excel files have same structure, header names. This is common way that used to change data source setting.
For safe, you could copy/clone your pbix file and try with copied file.:smileyvery-happy:
Hi Anonymous,
I realize this thread is several years old. Hoping I might be able to ask a follow up question to this. Your advice helped me to link my PBI report to newly names tabs (same format in the tabs).
My original add in for some tabs brought in blank columns of data, which appeared with names such as Column41. I used the Applied Steps in the Query Editor to eliminate these from view. However, the new tab that I have the report linked doesn't have these columns, so it isn't successfully pulling in the data.
Is there a way in the Advanced Editor to rid the report from even looking for this Column41? I don't see an attachment option, so I am adding the Advanced Editor Code for one of the tabs:
let
Source = Excel.Workbook(File.Contents("H:\Temporary\Tenneco_AM_NO_SCG_V5 (Set 1 Scenarios) 2.0 (Copy).xlsx"), null, true),
#"Production Data_Sheet" = Source{[Item="OO_Productions",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"Production Data_Sheet"),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"ScenarioName", type text}, {"ScenarioID", Int64.Type}, {"SiteName", type text}, {"ProductName", type text}, {"PeriodName", type text}, {"ProductionQuantity", type number}, {"NetProductionQuantity", type number}, {"ByproductProductionQuantity", Int64.Type}, {"TotalProductionQuantity", type number}, {"ProductionWeight", type number}, {"ProductionCubic", type number}, {"ProductionCost", Int64.Type}, {"CO2", Int64.Type}, {"CO2Cost", Int64.Type}, {"TotalCost", Int64.Type}, {"PeriodNo", Int64.Type}, {"BOMCost", type any}, {"PolicyCost", type any}, {"ProcessCost", type any}, {"StepNumber", Int64.Type}, {"ID", Int64.Type}, {"Column22", type any}, {"Column23", type any}, {"Column24", type any}, {"Column25", type any}, {"Column26", type any}, {"Column27", type any}, {"Column28", type any}, {"Column29", type any}, {"Column30", type any}, {"Column31", type any}, {"Column32", type any}, {"Column33", type any}, {"Column34", type any}, {"Column35", type any}, {"Column36", type any}, {"Column37", type any}, {"Column38", type any}, {"Column39", type any}, {"Column40", type any}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"Column22", "Column39", "Column38", "Column23", "Column24", "Column25", "Column26", "Column27", "Column28", "Column29", "Column30", "Column31", "Column32", "Column33", "Column34", "Column35", "Column36", "Column37", "Column40"}),
#"Filtered Rows" = Table.SelectRows(#"Removed Columns", each true)
in
#"Filtered Rows"
Sorry for the length, and appreciate any advice you can give!
BR,
-Alex
Hi thumah2013,
Hope Handling Added & Missing columns in source topic of Chris Web - Expert in M Language could help you.