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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Extract Data from table with dynamic names

Hello,

 

i have multiples excel files with data saved in a certain worksheet. The name of this worksheet is different in every Excel file, but the name of the worksheet always starts with "Data ". How to i open the data from a specific worksheet?

 

 So somehow, if the Name begins with "Data ", the Query should open (or click) this Table. 

o0omaxrbi_2-1666181434207.png

What I tried so far: Adding a custom Column, which has the Name of the Data, if it starts with "Data ".  No I tried to open it, with a Conditional, but havent managed to do it.

 

 

#"Added Custom" = Table.AddColumn(Source, "GetDataName", each if Text.StartsWith([Name],"Data ") then [Name] else null),

 

 

How do I open a Table based on the dynamic name?

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

You should just be able to filter your name column, something like this:

Table.SelectRows(previousStepName, each Text.StartsWith([Name], "Data "))

Then expand the [Data] column using the button at the top right that looks like two arrows bending away from each other.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @Anonymous ,

 

You should just be able to filter your name column, something like this:

Table.SelectRows(previousStepName, each Text.StartsWith([Name], "Data "))

Then expand the [Data] column using the button at the top right that looks like two arrows bending away from each other.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Thank you!

 

How do i now open this table ? I usually click on the Table. Clicking it hardcodes the name, tough.

 

o0omaxrbi_1-1666185265806.png

 

 

 

 

BA_Pete_0-1666186370591.png

 

BA_Pete_1-1666186401549.png

 

Pete

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.