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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
giost
Regular Visitor

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" 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).

 

Any idea how to achieve this?

2 REPLIES 2
Fowmy
Super User
Super User

@giost 

You can create a measure for each value PBI Version="1.0.0.0", PBI Envrionment="Test", PBI Author="XXX" etc and they will be available for you to show on any visual.

Not sure If I understand your question 🙂

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

giost
Regular Visitor

@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).

 

let    
    Source = Record.ToTable(#sections[Section1]),
    #"Filter Parameters" = Table.SelectRows(Source, each (Value.Is([Value], type text)))
in
    #"Filter Parameters"

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors