Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
I have a certain parameter that I want to use in Power BI filters, so that I can update a column (it's a custom column that switches columns depending on the parameter).
Is there a solution for that?
Regards,
Solved! Go to Solution.
Hi @ZeinebDerbel ,
Based on my test, the query column seems work fine to create a dynamic columnm, you can remove initial columns in power query
In addition, creating a calculated column cannot achieve because calculated column is a static column not dynamic, if you want to create a new table including language, you need to create a measure liek this and have a reference column in a table visual:
Result =
IF(
SELECTEDVALUE(Lang[Lang]) = "EN",
SELECTEDVALUE('Table'[NameEN]),
SELECTEDVALUE('Table'[Name])
)
Attached my sample file that you can refer: How to use parameters in Power BI filters.pbix
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ZeinebDerbel ,
Can you please paste the calculation here for your calculated column which uses parameter in it?
Thanks,
Pragati
Hi,
The query for my column:
" Table.AddColumn(#"Changed Type", "DynamicColumn", each if Language = "EN" then [NameEN] else [Name])"
Language is the parameter I'm using.
Also, I tried another way, by making a new table with a column for language. But I'm having troubles with SELECTEDVALUE().
This is the DAX query for my column:
Hi @ZeinebDerbel ,
Based on my test, the query column seems work fine to create a dynamic columnm, you can remove initial columns in power query
In addition, creating a calculated column cannot achieve because calculated column is a static column not dynamic, if you want to create a new table including language, you need to create a measure liek this and have a reference column in a table visual:
Result =
IF(
SELECTEDVALUE(Lang[Lang]) = "EN",
SELECTEDVALUE('Table'[NameEN]),
SELECTEDVALUE('Table'[Name])
)
Attached my sample file that you can refer: How to use parameters in Power BI filters.pbix
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Yes thank you!
This works perfectly.
Regards,
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
54 | |
39 | |
33 | |
31 | |
25 |