Forum Discussion
How to select columns in PowerBI using a parameter
I have to build a Bilingual powerBI report. In my data, I have both English and French descriptive columns.
In tableau, for e.g. I was able to create a parameter called 'Language and then create a calculated column like Product = IIF([Language], [PRODUCT_NAME_EN],[PRODUCT_NAME_FR])
This would allow me to use the Product column in other places and it would automatically decide which text to display based on the language the user chooses.
How would I go about doing the same in PowerBI?
I tried the same approach in powerBI, by creating a Binary parameter, but it doesnot allow me to reference the parameter while creating a new column.
- Anonymous2 years ago
Hi swapnilklkar ,
I created a sample pbix file(see the attachment) using two different methods, please check if they can help you achieve your requirement.
1. By creating a field parameter
Language = { ("EN", NAMEOF('Table'[PRODUCT_NAME_EN]), 0), ("FR", NAMEOF('Table'[PRODUCT_NAME_FR]), 1) }2. By creating a Power Query parameter
Create query parameter
Create a custom column
Best Regards
1 Reply
- AnonymousNot applicable
Hi swapnilklkar ,
I created a sample pbix file(see the attachment) using two different methods, please check if they can help you achieve your requirement.
1. By creating a field parameter
Language = { ("EN", NAMEOF('Table'[PRODUCT_NAME_EN]), 0), ("FR", NAMEOF('Table'[PRODUCT_NAME_FR]), 1) }2. By creating a Power Query parameter
Create query parameter
Create a custom column
Best Regards