Forum Discussion
Anonymous
5 years agoNot applicable
How to persist #sections document introspection variable in Power BI
Hi, I would like to setup a series of parameters so that I can access them easily set their values in the Power BI service (for e.g. PBI Version="1.0.0.0", PBI Envrionment="Test", PBI Author="XXX" e...
ferryv
1 year agoResolver II
This response might be a bit late. I ended up creating a "lookup" table in PQ with the parameter info, similar to the below. Not ideal as it will not dynamically add/remove parameters when the list changes, but at least it refreshes the values when they are updated and they can be used in DAX.
let Source =
Table.FromRecords({
[Name="Parameter name", Value = #"Parameter Name"], //reference to the parameter,
[Name="another Parameter name", Value = #"Another Parameter Name"] //reference to the parameter
})
in
SourceAnd then adding a DAX measure, e.g.
File Content Value = var parameterName = "Parameter Name" return LOOKUPVALUE(<tablename>[Value],<tablename>[Name],parameterName)
Replace <tablename> with the name of the query/table you're referencing.
Also documented here: https://www.linkedin.com/pulse/using-parameters-powerbi-ferry-van-der-vorst-6p1ee/