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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pit927
Regular Visitor

How can I use a parameter to select a column?

Hi!
How can I use an input parameter in the function to select a column?

Same as using ["NAME COLUMN"], then use a parameter: [parameter]
For example, in this case of combining columns:

Ejemplo para foro.png
When I introduce the parameter, I replace it within the [ ]

Because I know that if I put it in the editor as: ["parameter"] it works, but I wanted to use it as a variable for more fields..


Thank you.
All the best!

4 REPLIES 4
Pit927
Regular Visitor

Hi @lbendlin 
If I remove the square brackets the result is:

IDFIELDID - FIELD
1Black1 - FIELD
2Yellow2 - FIELD
3Orange3 - FIELD
4Blue4 - FIELD
5Green5 - FIELD


I need this result:

IDFIELDID - FIELD
1Black1 - Black
2Yellow2 - Yellow
3Orange3 - Orange
4Blue4 - Blue
5Green5 - Green


I need select the column with the name of the parameter. 

Read about Expression.Evaluate. Make sure to read the scope part carefully.

It doesn't work for me. What I need is a toString of the parameter inside the brackets to search the column. Now it's looking for Field literally.

lbendlin
Super User
Super User

specify only the parameter name, remove the square brackets.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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