{"id":2005,"date":"2021-07-23T10:40:01","date_gmt":"2021-07-23T10:40:01","guid":{"rendered":"https:\/\/bi.unija.com\/en\/?p=2005"},"modified":"2021-07-23T10:40:01","modified_gmt":"2021-07-23T10:40:01","slug":"shifting-a-column-one-row-up-in-power-bi","status":"publish","type":"post","link":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/","title":{"rendered":"Shifting A Column One Row Up In Power BI"},"content":{"rendered":"<p><em>For Power BI version 2.76.5678.782 (December 2019).<\/em><\/p>\n<p>Shifting a column up or down for one row is something Power Query can&#8217;t do on it&#8217;s own. It&#8217;s nonetheless simple to do, just follow the steps below.<\/p>\n<p>In our example our data looks like this.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"355\" height=\"345\" class=\"wp-image-2006\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-8.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-8.png 355w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-8-300x292.png 300w\" sizes=\"(max-width: 355px) 100vw, 355px\" \/><\/p>\n<p>We would like to shift the column up for one row.<\/p>\n<p>First sort the columns of interest, in our example we sort column <strong>Date<\/strong> descending.<\/p>\n<p>Make a new index column starting from 1 using <strong>Add Column &gt; Index Column &gt; From 1<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"517\" height=\"345\" class=\"wp-image-2007\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-9.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-9.png 517w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-9-300x200.png 300w\" sizes=\"(max-width: 517px) 100vw, 517px\" \/><\/p>\n<p>Make a second new index column starting from 0 using <strong>Add Column &gt; Index Column &gt; From 0<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"345\" class=\"wp-image-2008\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-10.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-10.png 675w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-10-300x153.png 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/p>\n<p>Merge your query with itself using <strong>Merge queries<\/strong> based in the two new indices.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"707\" height=\"639\" class=\"wp-image-2009\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-11.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-11.png 707w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-11-300x271.png 300w\" sizes=\"(max-width: 707px) 100vw, 707px\" \/><\/p>\n<p><strong>Expand<\/strong> the merged query for the <strong>AC<\/strong> column only.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"315\" class=\"wp-image-2010\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-12.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-12.png 627w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-12-300x151.png 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/p>\n<p>Now you have a new <strong>AC<\/strong> column, duplicated from the old one with a shift of one row.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"345\" class=\"wp-image-2011\" src=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-13.png\" srcset=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-13.png 834w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-13-300x124.png 300w, https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/word-image-13-768x318.png 768w\" sizes=\"(max-width: 834px) 100vw, 834px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For Power BI version 2.76.5678.782 (December 2019). Shifting a column up or down for one row is something Power Query can&#8217;t do on it&#8217;s own. It&#8217;s nonetheless simple to do, just follow the steps below. In our example our data<\/p>\n","protected":false},"author":5,"featured_media":2012,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2005","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Shifting A Column One Row Up In Power BI - Bi Unija<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Shifting A Column One Row Up In Power BI - Bi Unija\" \/>\n<meta property=\"og:description\" content=\"For Power BI version 2.76.5678.782 (December 2019). Shifting a column up or down for one row is something Power Query can&#8217;t do on it&#8217;s own. It&#8217;s nonetheless simple to do, just follow the steps below. In our example our data\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/\" \/>\n<meta property=\"og:site_name\" content=\"Bi Unija\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-23T10:40:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png\" \/>\n\t<meta property=\"og:image:width\" content=\"720\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Branka Trifunovi\u0107\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Branka Trifunovi\u0107\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/\",\"url\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/\",\"name\":\"Shifting A Column One Row Up In Power BI - Bi Unija\",\"isPartOf\":{\"@id\":\"https:\/\/bi.unija.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png\",\"datePublished\":\"2021-07-23T10:40:01+00:00\",\"author\":{\"@id\":\"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10\"},\"breadcrumb\":{\"@id\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#primaryimage\",\"url\":\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png\",\"contentUrl\":\"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png\",\"width\":720,\"height\":480},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bi.unija.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shifting A Column One Row Up In Power BI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bi.unija.com\/en\/#website\",\"url\":\"https:\/\/bi.unija.com\/en\/\",\"name\":\"Bi Unija\",\"description\":\"Just another Bi site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bi.unija.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10\",\"name\":\"Branka Trifunovi\u0107\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bi.unija.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g\",\"caption\":\"Branka Trifunovi\u0107\"},\"url\":\"https:\/\/bi.unija.com\/en\/author\/branka\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Shifting A Column One Row Up In Power BI - Bi Unija","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:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/","og_locale":"en_US","og_type":"article","og_title":"Shifting A Column One Row Up In Power BI - Bi Unija","og_description":"For Power BI version 2.76.5678.782 (December 2019). Shifting a column up or down for one row is something Power Query can&#8217;t do on it&#8217;s own. It&#8217;s nonetheless simple to do, just follow the steps below. In our example our data","og_url":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/","og_site_name":"Bi Unija","article_published_time":"2021-07-23T10:40:01+00:00","og_image":[{"width":720,"height":480,"url":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png","type":"image\/png"}],"author":"Branka Trifunovi\u0107","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Branka Trifunovi\u0107","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/","url":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/","name":"Shifting A Column One Row Up In Power BI - Bi Unija","isPartOf":{"@id":"https:\/\/bi.unija.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#primaryimage"},"image":{"@id":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#primaryimage"},"thumbnailUrl":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png","datePublished":"2021-07-23T10:40:01+00:00","author":{"@id":"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10"},"breadcrumb":{"@id":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#primaryimage","url":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png","contentUrl":"https:\/\/bi.unija.com\/en\/wp-content\/uploads\/sites\/2\/2021\/07\/52.png","width":720,"height":480},{"@type":"BreadcrumbList","@id":"https:\/\/bi.unija.com\/en\/shifting-a-column-one-row-up-in-power-bi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bi.unija.com\/en\/"},{"@type":"ListItem","position":2,"name":"Shifting A Column One Row Up In Power BI"}]},{"@type":"WebSite","@id":"https:\/\/bi.unija.com\/en\/#website","url":"https:\/\/bi.unija.com\/en\/","name":"Bi Unija","description":"Just another Bi site","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bi.unija.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bi.unija.com\/en\/#\/schema\/person\/3bed36623727c7162e421c4366a54e10","name":"Branka Trifunovi\u0107","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bi.unija.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ec99f651bcc98a163161515ec254b974?s=96&d=mm&r=g","caption":"Branka Trifunovi\u0107"},"url":"https:\/\/bi.unija.com\/en\/author\/branka\/"}]}},"_links":{"self":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts\/2005"}],"collection":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/comments?post=2005"}],"version-history":[{"count":1,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts\/2005\/revisions"}],"predecessor-version":[{"id":2013,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/posts\/2005\/revisions\/2013"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/media\/2012"}],"wp:attachment":[{"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/media?parent=2005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/categories?post=2005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bi.unija.com\/en\/wp-json\/wp\/v2\/tags?post=2005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}