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
iLoveTea
Frequent Visitor

How to concatenate a parameter in a query in advanced editor

Hello Community,

 

I have a query that i would like to use multiple times for different people.

I just need to change one case in the query to fit to the need of the person.

To make it easier i would like to pass a variable in a query to change that case.

 

Here's what i have :

1. Here is the case part that needs to be changed

iLoveTea_0-1669908872903.png

2. Here's a table i created with the correct values for each client

iLoveTea_1-1669909011516.png

3. Here's a parameter to choose between the different clients

iLoveTea_2-1669909125164.png

 

Here's what i would like : 

 

When i select one client in my parameter (3.), the correct value for the client (2.) is used in the query after "then " for each stage (1.)

 

For example, if you Select AGAP2BE in the parameter i want :

iLoveTea_3-1669909420294.png

Thank you for your help 🙂 

 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @iLoveTea ;

According my understand, you could create a dynamic parameter.

vyalanwumsft_0-1669967480457.png

Then add a new step.

 

= Table.SelectColumns(#"Added Custom",Parameter3)

 

vyalanwumsft_1-1669967511123.png
the final result:
vyalanwumsft_2-1669967527840.png

vyalanwumsft_3-1669967546455.png

if not right, Can you share the scene you want? I'm a little unclear where your Code Red.

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @iLoveTea ;

According my understand, you could create a dynamic parameter.

vyalanwumsft_0-1669967480457.png

Then add a new step.

 

= Table.SelectColumns(#"Added Custom",Parameter3)

 

vyalanwumsft_1-1669967511123.png
the final result:
vyalanwumsft_2-1669967527840.png

vyalanwumsft_3-1669967546455.png

if not right, Can you share the scene you want? I'm a little unclear where your Code Red.

Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, 
Your solution worked for me.
I now have an error when using the column in a vizualisation because it is named dynamically.

Here is a screenshot showing the error :

iLoveTea_1-1670229779461.png

 

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.