Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
collinq
Super User
Super User

Create separate queries from initial Excel list

HI all,

I have an interesting issue.  I get an Excel sheet with a list of 10 different Excel files (in 10 different folders). 

 

The list is very simple - 3 columns.  

Column 1 = the path to the Excel file (C";\\networkpath\xxxxx.xlsx)

Column 2 = the sheet name in the Excel File that I want (ie. ReportMe) since each workbook has multiple sheetsand I have to know which one is the one for the report

Column 3 = an identifier field - call it ListID

 

I have been experimenting with Functions and Parameters and am not quite getting what I need from this initial input.

 

What I want to get next is 10 separate queries (I am able to get to a point where they all append, but that is not quite right).

 

I want something like:

Query 1 = if ListID is "1" then go to the path and the named sheet in the original list and bring that sheet's results back

Query 2 = if ListID  is "2" then go to the path and the named sheet in the original list and bring that sheet's results back

Query 3 = if ListID is "3" then go to the path and the named sheet in the original list and bring that sheet's results back

and so on up to query 10

 

So 3 variables in my mind - ListID, Path and SheetName

And some sort of invoke function to get that list.

 

I can't just hard code the 10 queries as the files, paths and sheet names will change.

 

Thanks for any help!

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.