How to persist #sections document introspection variable in Power BI
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="184.108.40.206", PBI Envrionment="Test", PBI Author="XXX" etc.)
I would like to dynamically display both parameter names and parameter values into for e.g. a multirow card in a PBI Report.
Now I can easily see them into Power Query using the #sections[Section1] in a Query but it seems such values are not persisted when loaded into the Power BI (the table in PBI is empty, it just shows the schema but without any row).
@Fowmy : thank you for your reply but the use case here is different.
I have a shared dataset and I need to setup a dev/ops pipeline that moves this dataset from one workspace to the other with powershell injecting as a parameter the correct Environment Version etc. Such values must be seen within the report so that people using the dataset knows his version etc.
I want to create a dynamic solution: a parser in power query (M) that scan/enlist all the parameters present in the file (I don't know in principle how many they are or their names) and print out in the report a list/table with param names and param values.
The code is this one but the values you see in power query are not loaded to power bi and cannot use in any visual because like I understand the variable #sessions "lives" only within power query and become blank as soon as you import in power bi (i.e. you press close & apply in power query).
Source = Record.ToTable(#sections[Section1]),
#"Filter Parameters" = Table.SelectRows(Source, each (Value.Is([Value], type text)))