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
nadavbi
Helper I
Helper I

Concatenating parameter to a table name

I'm using the advanced editor to get many data tables.

One of the relevant lines in the editor looks like this (or similar)

powerbi_test_86035_meta_Table = templates_Schema{[Name="powerbi_test_86035_meta",Kind="Table"]}[Data]

I want to be able to replace the number in the middle (86035) with some kind of manual parameter, so when I change the parameter once, all the tables will update accordingly.

Is there a way to do this?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@nadavbi , create a parameter as TEXT, I've called it Parameter1 in this example.

 

Add this M code to your query:

 

PowerBI_Name_FromParameter = "powerbi_test_" & Parameter1 & "_meta",
Table_FromParameter =  templates_Schema{[Name=PowerBI_Name_FromParameter,Kind="Table"]}[Data]

The first step simply concatenates the name using the Parameter1 value

The second step passes the concatenated name in to return the proper table.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@nadavbi , create a parameter as TEXT, I've called it Parameter1 in this example.

 

Add this M code to your query:

 

PowerBI_Name_FromParameter = "powerbi_test_" & Parameter1 & "_meta",
Table_FromParameter =  templates_Schema{[Name=PowerBI_Name_FromParameter,Kind="Table"]}[Data]

The first step simply concatenates the name using the Parameter1 value

The second step passes the concatenated name in to return the proper table.

Did not work for me.  Using Power BI Desktop optimized for Report Server (on-premise) January 2020 Release.

 

Thanks and regards,

Jitendra Pandey

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.

Top Solution Authors