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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How to extract column names from a table

Hi All

 

I have imported a SQL Server table. I want to get the column names of that table. Have gone thru the below link and tried the solution specified. The solution lists the table name and column names, but the values are not persistent. Cannot use that in report.

 

https://community.powerbi.com/t5/Power-Query/Getting-a-list-of-all-columns-in-all-tables-in-the-data...

 

Looking for something like this:

 

Table NameColumn Name
Table1Column1
Table1Column2
Table1Column3

 

1 ACCEPTED SOLUTION
VijayP
Super User
Super User

@Anonymous 

In each Table you need to 

1. Demote the Header as First Row

2. Transpose

3. do this all tables

4. append all tables and remove unnecessary columns

you will get the result. Hope this helps you

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

2 REPLIES 2
VijayP
Super User
Super User

@Anonymous 

In each Table you need to 

1. Demote the Header as First Row

2. Transpose

3. do this all tables

4. append all tables and remove unnecessary columns

you will get the result. Hope this helps you

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Thank you @VijayP . That is a good work around, even though have to do this for each of the tables. 

Helpful resources

Announcements
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.