March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I have a power bi file that is pulling data from thousands of excel files. I want the BI to pull a certain tab all with the same name in all the files. It works in most cases but there are a few files where is pulls in data from tabs with similar names. The tab I want to pull is "Final_Payment HW" the tab is is also pulling is "Payment HW". Below is the Transform file logic. Has anyone incountered this issue?
= (Parameter1) => let
Source = Excel.Workbook(Parameter1, null, true),
#"Final_H&W_Sheet" = Source{[Item="Final_Payment HW",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(#"Final_H&W_Sheet", [PromoteAllScalars=true])
in
#"Promoted Headers"
Thanks!
Solved! Go to Solution.
Basing on just the M Script itself, your query shouldn't be pulling data other than from Final_Payment HW. In fact if you change the item name into something else and it doesn't exist, the query would throw an error.
Below is a screenshot of a typical Source step with an excel file as the data source and the typical M script to retrieve the contents of Table in Data column in the first row would be = Source{[Item="Sheet1",Kind="Sheet"]}[Data].
Now if I changed the item name to just Sheet instead, that would result to an error as Sheet doesn't exist iin column Item.
Proud to be a Super User!
Basing on just the M Script itself, your query shouldn't be pulling data other than from Final_Payment HW. In fact if you change the item name into something else and it doesn't exist, the query would throw an error.
Below is a screenshot of a typical Source step with an excel file as the data source and the typical M script to retrieve the contents of Table in Data column in the first row would be = Source{[Item="Sheet1",Kind="Sheet"]}[Data].
Now if I changed the item name to just Sheet instead, that would result to an error as Sheet doesn't exist iin column Item.
Proud to be a Super User!
Thats very strange. Can you show a picture of the excel tab in the file where it's pulling "Payment HW" from?
User | Count |
---|---|
117 | |
77 | |
58 | |
52 | |
46 |
User | Count |
---|---|
171 | |
117 | |
63 | |
57 | |
51 |