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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
CEllis
Resolver I
Resolver I

Switching between Text Columns

I feel this should be very easy but cant find the syntax.

 

I have 2 text columns [Name] and [Number]

 

I want to use a slicer to swap the [Name] for the [Number] to anonymise the data.

 

Many thanks

 

Chris

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @CEllis ,

 

Hope all is going well.

 

To dynamically switch columns, you can use field parameters, which is a preview function. The specific steps are as follows:

 

Enable field parameters in File>>Options.

vhuijieymsft_0-1707299159170.png

 

Select New Parameter>>Fileds on the Modeling tab under the Report view.

vhuijieymsft_1-1707299092973.png

 

Select the fields you want to apply as shown in the figure below. In this case, select "Name" and "Number" of the "Table" table.

vhuijieymsft_2-1707299092975.png

 

Drag the Parameter you created into the table visual to display it.

vhuijieymsft_1-1707299194373.png

 

Now you can select different items in Slicer to display different columns to achieve dynamic switching of columns.

vhuijieymsft_2-1707299206063.png

 

If you want to know more about field parameters, please refer to the following documentation link.

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn [c3...

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @CEllis ,

 

Hope all is going well.

 

To dynamically switch columns, you can use field parameters, which is a preview function. The specific steps are as follows:

 

Enable field parameters in File>>Options.

vhuijieymsft_0-1707299159170.png

 

Select New Parameter>>Fileds on the Modeling tab under the Report view.

vhuijieymsft_1-1707299092973.png

 

Select the fields you want to apply as shown in the figure below. In this case, select "Name" and "Number" of the "Table" table.

vhuijieymsft_2-1707299092975.png

 

Drag the Parameter you created into the table visual to display it.

vhuijieymsft_1-1707299194373.png

 

Now you can select different items in Slicer to display different columns to achieve dynamic switching of columns.

vhuijieymsft_2-1707299206063.png

 

If you want to know more about field parameters, please refer to the following documentation link.

Let report readers use field parameters to change visuals (preview) - Power BI | Microsoft Learn [c3...

 

pbix file is attached.

 

If you have any further questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

@Anonymous 

 

Fantastic works brilliantly, much appreciated.

Syk
Resident Rockstar
Resident Rockstar

If the number is on the same row as the name, just put the number into the slicer.

If not, can you share a bit more about your data/model?

I have the name in a lot of charts and tables and would like to be able to swap it dynamically when needing to demostrate to those who are not allowed to see the names.

 

TableNameNumber

NameNumber
David1
Paul2
Katy3
Fred4
George5

 

If a slicer selection was "Yes" swap the Name for the Number.

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.