cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
andi2333
Regular Visitor

Need help for a simple try otherwise query

Hello, I am pretty new to powerBI and this forum and I am seeking help for a seemingly easy case.

 

I am trying to load data from multiple excel sheets which are all in a folder. Each sheet has multiple tabs with changing names. I only need data from one tab from each file.

 

I was trying to handle this with the following statement, but now I have problems with the syntax for the 2nd error case....basically I am trying to create a nested try-otherwise statement, but I am not sure if such a thing even exists.

 

 

#"Order List_Sheet" = try Source{[Item="Order List",Kind="Sheet"]}[Data] otherwise Source{[Item="OrderList",Kind="Sheet"]}[Data] otherwise Source{[Item="Order list",Kind="Sheet"]}[Data],

 

 

Any help on this is much appreciated.

 

Thanks

 

1 ACCEPTED SOLUTION
AndrewPF
Helper V
Helper V

I think you may need another "try": 

#"Order List_Sheet" = try Source{[Item="Order List",Kind="Sheet"]}[Data] otherwise try Source{[Item="OrderList",Kind="Sheet"]}[Data] otherwise Source{[Item="Order list",Kind="Sheet"]}[Data],

View solution in original post

1 REPLY 1
AndrewPF
Helper V
Helper V

I think you may need another "try": 

#"Order List_Sheet" = try Source{[Item="Order List",Kind="Sheet"]}[Data] otherwise try Source{[Item="OrderList",Kind="Sheet"]}[Data] otherwise Source{[Item="Order list",Kind="Sheet"]}[Data],

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors