{"id":324,"date":"2023-01-20T09:21:54","date_gmt":"2023-01-20T09:21:54","guid":{"rendered":"https:\/\/grionic.com\/?p=324"},"modified":"2023-01-20T09:21:56","modified_gmt":"2023-01-20T09:21:56","slug":"convert-row-to-column-in-power-query","status":"publish","type":"post","link":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/","title":{"rendered":"How to Convert Row to Column in Power Query"},"content":{"rendered":"\n

Have you ever wondered how you can convert a row to a column in Power Query? This article teaches you the easiest approach to achieving this.<\/p>\n\n\n\n

Let’s get started.<\/p>\n\n\n\n

Introduction<\/h2>\n\n\n\n

To get started, insert your data into Power BI. Select the worksheet you want to work with, and click on Transform Data<\/strong>. <\/p>\n\n\n\n

For this tutorial, I will make use of Excel data with Alternate Rows<\/strong> (as displayed below). You can download the data here<\/a>.<\/p>\n\n\n\n

Here, click Transform Data<\/strong> and it will take you to Power Query Editor.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now, this is Power Query Editor, and this is where we will convert the rows into columns. <\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Create a Conditional Column<\/h2>\n\n\n\n

Now, to convert the row into a column, we are going to create a conditional column. So, go to the Add Column<\/strong> tab and select Conditional Column<\/strong>, just right under it.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

That presents us with the Conditional Column window.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

You can rename the column if you want. Now, it is time to create a condition (I renamed mine as New Address<\/strong>). <\/p>\n\n\n\n

The condition I created is that “If the column ID equals null, then the output should be the Location (where the address is). Else, return a null.”<\/strong><\/p>\n\n\n\n

This is what really makes the difference to just duplicating the column because by bringing the null values, we will be able to fill them in later.<\/em><\/p>\n\n\n\n

Now, click OK<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

By clicking OK<\/strong>, you will get this additional column added to you your data. But it does look impressive yet, does it? <\/p>\n\n\n\n

We still have the address, but not in the same role as the ID and values.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now, the next thing to do is to select<\/strong> the New Address<\/strong> column and go to the Transform<\/strong> tab click on Fill<\/strong> and select Up<\/strong>.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

This will fill the null values with the addresses. And now, we will go on to remove the null rows, because they are no longer needed.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

To remove the null rows, filter the ID column, uncheck null,<\/strong> and click OK.<\/strong><\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now we have our data. We have just converted from a row into an additional column. You can now close and apply<\/strong> (in the home tab), and continue with your report.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Conclusion: How to Convert Row to Column in Power Query<\/h2>\n\n\n\n

Now, that is how to convert rows to columns in Power Query. And do not forget to practice this with as much data as possible.<\/p>\n\n\n\n

Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"

Have you ever wondered how you can convert a row to a column in Power Query? This article teaches you … <\/p>\n

Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":325,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,10,21],"tags":[],"yoast_head":"\nHow to Convert Row to Column in Power Query - grionic<\/title>\n<meta name=\"description\" content=\"In this article, we will learn how to convert a row to a column in Power Query, using an Excel data. Read to learn more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Convert Row to Column in Power Query - grionic\" \/>\n<meta property=\"og:description\" content=\"In this article, we will learn how to convert a row to a column in Power Query, using an Excel data. Read to learn more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/\" \/>\n<meta property=\"og:site_name\" content=\"grionic\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-20T09:21:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T09:21:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"405\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"AJ\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"AJ\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/\",\"url\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/\",\"name\":\"How to Convert Row to Column in Power Query - grionic\",\"isPartOf\":{\"@id\":\"https:\/\/grionic.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png\",\"datePublished\":\"2023-01-20T09:21:54+00:00\",\"dateModified\":\"2023-01-20T09:21:56+00:00\",\"author\":{\"@id\":\"https:\/\/grionic.com\/#\/schema\/person\/c573f60fbeba4ce8155d576d0819ffb8\"},\"description\":\"In this article, we will learn how to convert a row to a column in Power Query, using an Excel data. Read to learn more.\",\"breadcrumb\":{\"@id\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#primaryimage\",\"url\":\"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png\",\"contentUrl\":\"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png\",\"width\":720,\"height\":405,\"caption\":\"How to Convert Row to Column in Power Query - grionic\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/grionic.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Convert Row to Column in Power Query\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/grionic.com\/#website\",\"url\":\"https:\/\/grionic.com\/\",\"name\":\"grionic\",\"description\":\"Learn Data Analysis Tools & Techniques\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/grionic.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/grionic.com\/#\/schema\/person\/c573f60fbeba4ce8155d576d0819ffb8\",\"name\":\"AJ\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/grionic.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/431e89db69ae98f2296a504b802f302b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/431e89db69ae98f2296a504b802f302b?s=96&d=mm&r=g\",\"caption\":\"AJ\"},\"sameAs\":[\"https:\/\/grionic.com\"],\"url\":\"https:\/\/grionic.com\/author\/oluwatosin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Convert Row to Column in Power Query - grionic","description":"In this article, we will learn how to convert a row to a column in Power Query, using an Excel data. Read to learn more.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/","og_locale":"en_US","og_type":"article","og_title":"How to Convert Row to Column in Power Query - grionic","og_description":"In this article, we will learn how to convert a row to a column in Power Query, using an Excel data. Read to learn more.","og_url":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/","og_site_name":"grionic","article_published_time":"2023-01-20T09:21:54+00:00","article_modified_time":"2023-01-20T09:21:56+00:00","og_image":[{"width":720,"height":405,"url":"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png","type":"image\/png"}],"author":"AJ","twitter_card":"summary_large_image","twitter_misc":{"Written by":"AJ","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/","url":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/","name":"How to Convert Row to Column in Power Query - grionic","isPartOf":{"@id":"https:\/\/grionic.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#primaryimage"},"image":{"@id":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#primaryimage"},"thumbnailUrl":"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png","datePublished":"2023-01-20T09:21:54+00:00","dateModified":"2023-01-20T09:21:56+00:00","author":{"@id":"https:\/\/grionic.com\/#\/schema\/person\/c573f60fbeba4ce8155d576d0819ffb8"},"description":"In this article, we will learn how to convert a row to a column in Power Query, using an Excel data. Read to learn more.","breadcrumb":{"@id":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/grionic.com\/convert-row-to-column-in-power-query\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#primaryimage","url":"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png","contentUrl":"https:\/\/grionic.com\/wp-content\/uploads\/2023\/01\/How-to-Convert-Row-to-Column-in-Power-Query-grionic.png","width":720,"height":405,"caption":"How to Convert Row to Column in Power Query - grionic"},{"@type":"BreadcrumbList","@id":"https:\/\/grionic.com\/convert-row-to-column-in-power-query\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/grionic.com\/"},{"@type":"ListItem","position":2,"name":"How to Convert Row to Column in Power Query"}]},{"@type":"WebSite","@id":"https:\/\/grionic.com\/#website","url":"https:\/\/grionic.com\/","name":"grionic","description":"Learn Data Analysis Tools & Techniques","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/grionic.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/grionic.com\/#\/schema\/person\/c573f60fbeba4ce8155d576d0819ffb8","name":"AJ","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/grionic.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/431e89db69ae98f2296a504b802f302b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/431e89db69ae98f2296a504b802f302b?s=96&d=mm&r=g","caption":"AJ"},"sameAs":["https:\/\/grionic.com"],"url":"https:\/\/grionic.com\/author\/oluwatosin\/"}]}},"_links":{"self":[{"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/posts\/324"}],"collection":[{"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/comments?post=324"}],"version-history":[{"count":2,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/posts\/324\/revisions"}],"predecessor-version":[{"id":352,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/posts\/324\/revisions\/352"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/media\/325"}],"wp:attachment":[{"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/media?parent=324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/categories?post=324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/grionic.com\/wp-json\/wp\/v2\/tags?post=324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}