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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to Change columns name dynamically by selecting the language from slicer

I have a table called ContactInfo which contains this data

 

FirstNameLastNamePhone
EricCraig416-555-0622
KimberlyMorris416-555-0144
AlisaRoss416-555-0580
JordanMoore416-555-0302

 

I have another table which contains EachFieldName and its value in English and French

IDFieldNameLanguage
1FirstNameEN
2LastNameEN
3PhoneEN
4prénomFR
5nom de familleFR
6téléphonerFR

 

Is there any way to change the column name dynamically by selecting the language from the slicer?

If I select FR from the slicer the Grid shows column names in french based on its reference table. 

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

Hi @Anonymous ,

According to your description, here's my solution.

1.In Power Query, add an index column in the ContactInfo table.

vkalyjmsft_0-1652239065757.png

2.Create a measure.

Measure =
IF (
    MAX ( 'Language Table'[FieldName] ) IN { "FirstName", "prénom" },
    MAX ( 'ContactInfo'[FirstName] ),
    IF (
        MAX ( 'Language Table'[FieldName] ) IN { "LastName", "nom de famille" },
        MAX ( 'ContactInfo'[LastName] ),
        MAX ( 'ContactInfo'[Phone] )
    )
)

3.Put the language column in a slicer, put index column in a matrix row, FieldName column from Language table in the matrix column and the measure in matrix value, get the correct result.

vkalyjmsft_1-1652239228142.png

vkalyjmsft_2-1652239421506.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, here's my solution.

1.In Power Query, add an index column in the ContactInfo table.

vkalyjmsft_0-1652239065757.png

2.Create a measure.

Measure =
IF (
    MAX ( 'Language Table'[FieldName] ) IN { "FirstName", "prénom" },
    MAX ( 'ContactInfo'[FirstName] ),
    IF (
        MAX ( 'Language Table'[FieldName] ) IN { "LastName", "nom de famille" },
        MAX ( 'ContactInfo'[LastName] ),
        MAX ( 'ContactInfo'[Phone] )
    )
)

3.Put the language column in a slicer, put index column in a matrix row, FieldName column from Language table in the matrix column and the measure in matrix value, get the correct result.

vkalyjmsft_1-1652239228142.png

vkalyjmsft_2-1652239421506.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , There is one solution discussed in detail here, please check if that can help

https://community.powerbi.com/t5/Desktop/Switch-between-Spanish-and-English-naming/td-p/1233340

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.