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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
AnotherBIUser
Helper I
Helper I

Creating a List of Queries and Fields from Model

Hello,

 

I am currently trying to create a powerquery tool that will take all the queries (100+) and create a new query that has two columns:

1) The Fields in the queries

2) The name of the query the field came from 

I need a simple list of each query and the fields that are inside of them. 

 

I could manually transform each of the queries (unpivot & add custom column with a typed in name of the query), but with this many queries I would prefer to avoid that. 

 

Any thoughts/ideas? Apprecaite any help the forms can offer!

2 ACCEPTED SOLUTIONS
slorin
Super User
Super User

Hi

 

= Table.ExpandListColumn(
Table.RemoveRowsWithErrors(
Table.TransformColumns(
Record.ToTable(#shared),
{{"Value", Table.ColumnNames}})
),
"Value")

 

Stéphane 

View solution in original post

Thank you so much! This is EXACTLY what I need!

View solution in original post

2 REPLIES 2
slorin
Super User
Super User

Hi

 

= Table.ExpandListColumn(
Table.RemoveRowsWithErrors(
Table.TransformColumns(
Record.ToTable(#shared),
{{"Value", Table.ColumnNames}})
),
"Value")

 

Stéphane 

Thank you so much! This is EXACTLY what I need!

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors