cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
primolee Helper III
Helper III

Using row data as column names

Hello everyone,

 

Following is my assumption, I have 4 columns in my raw data - Column Name, Channel, Placement and Content.

 

I want to use data in "Column Name" as column names and use data in that column cell accordingly to generate "Custom Column".

 

Is there a way of doing so in Power Query?

 

I understand a column is expressed in square brackets, but what expression should I use to achieve the above?

 

Thank you so much for your time and help.

 

Temp.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Re: Using row data as column names

@primolee 

 

Try this custom column from Query Editor

 

=Record.Field(_,[ColumnName])

 

Try my new Power BI game Cross the River

View solution in original post

2 REPLIES 2
Super User III
Super User III

Re: Using row data as column names

@primolee 

 

Try this custom column from Query Editor

 

=Record.Field(_,[ColumnName])

 

Try my new Power BI game Cross the River

View solution in original post

primolee Helper III
Helper III

Re: Using row data as column names

Didn't know this expression!  Work like charm!  Thank you!

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors