{"id":1418,"date":"2023-01-28T06:03:05","date_gmt":"2023-01-28T06:03:05","guid":{"rendered":"https:\/\/monocroft.com\/?p=1418"},"modified":"2023-01-30T05:08:47","modified_gmt":"2023-01-30T05:08:47","slug":"how-to-unpivot-columns-to-rows-in-powerbi","status":"publish","type":"post","link":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/","title":{"rendered":"How to Unpivot Columns to Rows in Power BI"},"content":{"rendered":"\n

Unpivoting a dataset involves converting column names into rows and their values into another column. In Power BI, you can unpivot columns to rows using the “Unpivot Columns” option in the “Transform” tab of the “Home” ribbon.<\/p>\n\n\n\n

In this article, I will take you through a step-by-step approach on how to unpivot columns to rows in Power BI Desktop.<\/p>\n\n\n\n

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

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

To get started, the first thing to do is to insert the data in Power BI. Then Transform Data<\/strong>, which takes you to Power Query Editor.<\/p>\n\n\n\n

NB: If you have multiple queries, you must select the query that contains the columns you want to transpose.<\/em><\/p>\n\n\n\n

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

After this, select the row you want on the first column (I selected Year)<\/em>, then go to the Transform<\/strong> tab and click on the drop-down on Unpivot Columns<\/strong>. Then select Unpivot Other Columns<\/strong>.<\/p>\n\n\n\n

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

As displayed below, this process has converted the columns to rows.<\/p>\n\n\n\n

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

After this process, the next thing to do is to rename the columns (by double-clicking)<\/em> and filter out unnecessary values. <\/p>\n\n\n\n

Now, you can close and apply<\/strong> your data (to save your setting)<\/em> in the home tab.<\/p>\n\n\n\n

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

Also, you can do this by using the DAX. You can use the UNPIVOT function. This function takes a table and returns a new table with the columns transposed to rows.<\/p>\n\n\n\n

Here is an example of how the DAX formula would look like:<\/p>\n\n\n\n

UNPIVOT(my_table, \"column_name\", \"row_name\", \"value\")<\/strong><\/code><\/p>\n\n\n\n

You can also pivot the data by using the function PIVOT.<\/p>\n\n\n\n

PIVOT(my_table, \"column_name\", \"row_name\", \"value\")<\/strong><\/code><\/p>\n\n\n\n

Conclusion: How to Unpivot Columns to Rows<\/h2>\n\n\n\n

NB: To duplicate the table to Unpivot data and keep the original if you want to keep the original data and create a new table.<\/em><\/p>\n\n\n\n

Finally, keep in mind that you can only use the Pivot and Unpivot functions on a single column. <\/p>\n\n\n\n

If you need to pivot\/unpivot multiple columns using the functions, you need to use the Advanced Editor.<\/p>\n\n\n\n

I hope you understand these steps.<\/p>\n\n\n\n

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

Unpivoting a dataset involves converting column names into rows and their values into another column. In Power BI, you can … <\/p>\n

Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":2037,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"yoast_head":"\nHow to Unpivot Columns to Rows in Power BI - Monocroft<\/title>\n<meta name=\"description\" content=\"Unpivoting columns to rows is a common feature in Power BI. This article explains how to Unpivot columns to rows in Power BI.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Unpivot Columns to Rows in Power BI - Monocroft\" \/>\n<meta property=\"og:description\" content=\"Unpivoting columns to rows is a common feature in Power BI. This article explains how to Unpivot columns to rows in Power BI.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\" \/>\n<meta property=\"og:site_name\" content=\"Monocroft\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-28T06:03:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-30T05:08:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.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=\"Matt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Matt\" \/>\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\":\"Article\",\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\"},\"author\":{\"name\":\"Matt\",\"@id\":\"https:\/\/monocroft.com\/#\/schema\/person\/3aeab97c9b5661d211c0742c48f024b3\"},\"headline\":\"How to Unpivot Columns to Rows in Power BI\",\"datePublished\":\"2023-01-28T06:03:05+00:00\",\"dateModified\":\"2023-01-30T05:08:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\"},\"wordCount\":329,\"publisher\":{\"@id\":\"https:\/\/monocroft.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png\",\"articleSection\":[\"Guides\",\"PowerBI\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\",\"url\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\",\"name\":\"How to Unpivot Columns to Rows in Power BI - Monocroft\",\"isPartOf\":{\"@id\":\"https:\/\/monocroft.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png\",\"datePublished\":\"2023-01-28T06:03:05+00:00\",\"dateModified\":\"2023-01-30T05:08:47+00:00\",\"description\":\"Unpivoting columns to rows is a common feature in Power BI. This article explains how to Unpivot columns to rows in Power BI.\",\"breadcrumb\":{\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage\",\"url\":\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png\",\"contentUrl\":\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png\",\"width\":720,\"height\":405},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/monocroft.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Unpivot Columns to Rows in Power BI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/monocroft.com\/#website\",\"url\":\"https:\/\/monocroft.com\/\",\"name\":\"Monocroft\",\"description\":\"Monocroft Tech\",\"publisher\":{\"@id\":\"https:\/\/monocroft.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/monocroft.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/monocroft.com\/#organization\",\"name\":\"Triburge\",\"url\":\"https:\/\/monocroft.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/monocroft.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/07\/monocroft-logo.png\",\"contentUrl\":\"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/07\/monocroft-logo.png\",\"width\":512,\"height\":512,\"caption\":\"Triburge\"},\"image\":{\"@id\":\"https:\/\/monocroft.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/monocroft.com\/#\/schema\/person\/3aeab97c9b5661d211c0742c48f024b3\",\"name\":\"Matt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/monocroft.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c06bcee4d38a649222493c5e9f11f7a5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c06bcee4d38a649222493c5e9f11f7a5?s=96&d=mm&r=g\",\"caption\":\"Matt\"},\"url\":\"https:\/\/monocroft.com\/author\/matthew\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Unpivot Columns to Rows in Power BI - Monocroft","description":"Unpivoting columns to rows is a common feature in Power BI. This article explains how to Unpivot columns to rows in Power BI.","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:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/","og_locale":"en_US","og_type":"article","og_title":"How to Unpivot Columns to Rows in Power BI - Monocroft","og_description":"Unpivoting columns to rows is a common feature in Power BI. This article explains how to Unpivot columns to rows in Power BI.","og_url":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/","og_site_name":"Monocroft","article_published_time":"2023-01-28T06:03:05+00:00","article_modified_time":"2023-01-30T05:08:47+00:00","og_image":[{"width":720,"height":405,"url":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png","type":"image\/png"}],"author":"Matt","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Matt","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#article","isPartOf":{"@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/"},"author":{"name":"Matt","@id":"https:\/\/monocroft.com\/#\/schema\/person\/3aeab97c9b5661d211c0742c48f024b3"},"headline":"How to Unpivot Columns to Rows in Power BI","datePublished":"2023-01-28T06:03:05+00:00","dateModified":"2023-01-30T05:08:47+00:00","mainEntityOfPage":{"@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/"},"wordCount":329,"publisher":{"@id":"https:\/\/monocroft.com\/#organization"},"image":{"@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage"},"thumbnailUrl":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png","articleSection":["Guides","PowerBI"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/","url":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/","name":"How to Unpivot Columns to Rows in Power BI - Monocroft","isPartOf":{"@id":"https:\/\/monocroft.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage"},"image":{"@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage"},"thumbnailUrl":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png","datePublished":"2023-01-28T06:03:05+00:00","dateModified":"2023-01-30T05:08:47+00:00","description":"Unpivoting columns to rows is a common feature in Power BI. This article explains how to Unpivot columns to rows in Power BI.","breadcrumb":{"@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#primaryimage","url":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png","contentUrl":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/01\/How-to-Unpivot-columns-into-rows-in-power-bi.png","width":720,"height":405},{"@type":"BreadcrumbList","@id":"https:\/\/monocroft.com\/how-to-unpivot-columns-to-rows-in-powerbi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/monocroft.com\/"},{"@type":"ListItem","position":2,"name":"How to Unpivot Columns to Rows in Power BI"}]},{"@type":"WebSite","@id":"https:\/\/monocroft.com\/#website","url":"https:\/\/monocroft.com\/","name":"Monocroft","description":"Monocroft Tech","publisher":{"@id":"https:\/\/monocroft.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/monocroft.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/monocroft.com\/#organization","name":"Triburge","url":"https:\/\/monocroft.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/monocroft.com\/#\/schema\/logo\/image\/","url":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/07\/monocroft-logo.png","contentUrl":"https:\/\/monocroft.com\/wp-content\/uploads\/2023\/07\/monocroft-logo.png","width":512,"height":512,"caption":"Triburge"},"image":{"@id":"https:\/\/monocroft.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/monocroft.com\/#\/schema\/person\/3aeab97c9b5661d211c0742c48f024b3","name":"Matt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/monocroft.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c06bcee4d38a649222493c5e9f11f7a5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c06bcee4d38a649222493c5e9f11f7a5?s=96&d=mm&r=g","caption":"Matt"},"url":"https:\/\/monocroft.com\/author\/matthew\/"}]}},"_links":{"self":[{"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/posts\/1418"}],"collection":[{"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/comments?post=1418"}],"version-history":[{"count":30,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/posts\/1418\/revisions"}],"predecessor-version":[{"id":2038,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/posts\/1418\/revisions\/2038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/media\/2037"}],"wp:attachment":[{"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/media?parent=1418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/categories?post=1418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monocroft.com\/wp-json\/wp\/v2\/tags?post=1418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}