{"id":11103,"date":"2019-04-23T17:29:13","date_gmt":"2019-04-23T15:29:13","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=11103"},"modified":"2024-02-06T16:09:25","modified_gmt":"2024-02-06T15:09:25","slug":"process-flat-data-using-modulo-in-power-query","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/process-flat-data-using-modulo-in-power-query\/","title":{"rendered":"Process Flat Data Using Modulo in Power Query"},"content":{"rendered":"<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/installing-power-query-excel-2010\/\" target=\"_blank\" rel=\"noopener noreferrer\">Power Query<\/a>\u00a0or Get &amp; Transform (In Excel 2016) lets you perform a series of steps to transform your Excel data. \u00a0One of the steps it allows you to take is to <strong>process flat data via the Modulo calculation in <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/50-things-you-can-do-with-excel-power-query\/\" target=\"_blank\" rel=\"noopener\" title=\"Power Query\" data-wpil-keyword-link=\"linked\">Power Query<\/a><\/strong><b>.<\/b><\/p>\n<p>This is a really cool trick that you have to see! In our table, we have this flat sales data, and we want to extract just the names:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11110\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-01.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"241\" height=\"503\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-01.png 241w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-01-144x300.png 144w\" sizes=\"(max-width: 241px) 100vw, 241px\" \/><\/p>\n<p>Imagine doing it by hand, it is going to take forever! But with Power Query, it will be done in a flash!<\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/qSkijI6Px_E?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo.xlsx\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo.xlsx\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">Process-Flat-Data-using-Modulo.xlsx<\/span><\/a><\/p>\n<p class=\"line-two\">\n<\/div>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1<\/strong>:<\/span>\u00a0Select your data and go to <strong><em>Data &gt; Get &amp; Transform &gt; From Table (Excel 2016) <\/em><\/strong><em>or<\/em><strong><em> Power Query &gt; Excel Data &gt; From Table (Excel 2013 &amp; 2010)<\/em><\/strong><\/p>\n<p><strong>Excel 2016:<\/strong><\/p>\n<p><strong><em>\u00a0<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/11\/Fill-Down-04.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5550\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/11\/Fill-Down-04.png\" alt=\"Keep Duplicates Using Power Query or Get &amp; Transform\" width=\"618\" height=\"132\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/11\/Fill-Down-04.png 618w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/11\/Fill-Down-04-300x64.png 300w\" sizes=\"(max-width: 618px) 100vw, 618px\" title=\"\"><\/a><\/em><\/strong><\/p>\n<p><strong>Excel 2013 &amp; 2010:<\/strong><\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3239\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table.png\" alt=\"Keep Duplicates Using Power Query or Get &amp; Transform\" width=\"777\" height=\"129\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table.png 777w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table-300x50.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2016\/06\/from-table-768x128.png 768w\" sizes=\"(max-width: 777px) 100vw, 777px\" title=\"\"><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2: <\/strong><\/span>This will open up the Power Query Editor.<\/p>\n<p>Notice that our flat sales data has a\u00a0<strong>pattern<\/strong>. The pattern &#8220;Region, Salesperson Name, Sales&#8221; <strong>repeats every 3 rows<\/strong>!<\/p>\n<p>Let as add an Index Column to number all of the rows. Go to <em><strong>Add Column &gt; General &gt; Index Column<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11111\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-02.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"370\" height=\"507\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-02.png 370w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-02-219x300.png 219w\" sizes=\"(max-width: 370px) 100vw, 370px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 3: <\/strong><\/span>This is where the magic happens!<\/p>\n<p>Make sure the Index column is selected. Go to <em><strong>Add Column &gt; Number Column &gt; Standard &gt; Modulo<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11112\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-03.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"715\" height=\"557\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-03.png 715w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-03-300x234.png 300w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/p>\n<p>Since our pattern repeats every 3 rows, let us type in 3.\u00a0<strong>Click OK.<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11113\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-04.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"1063\" height=\"368\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-04.png 1063w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-04-300x104.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-04-1024x354.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-04-768x266.png 768w\" sizes=\"(max-width: 1063px) 100vw, 1063px\" \/><\/p>\n<p>Now we have our modulo results.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11114\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-05.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"457\" height=\"342\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-05.png 457w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-05-300x225.png 300w\" sizes=\"(max-width: 457px) 100vw, 457px\" \/><\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 4: <\/strong><\/span>Notice that the Salesperson name consistently matches the Modulo value 1? We can now extract the names quickly!<\/p>\n<p>Click on the <strong>Filter icon of the Modulo column<\/strong> and make sure only\u00a0<strong>1 is ticked.\u00a0<\/strong>This will hide the other unnecessary rows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11115\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-06.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"480\" height=\"374\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-06.png 480w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-06-300x234.png 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 5: <\/strong><\/span>Click <strong>Close &amp; Load<\/strong> from the <strong>Home<\/strong> tab and this will <strong>open up a brand new worksheet<\/strong> in your Excel workbook with the updated records!<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11116\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-07.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"503\" height=\"294\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-07.png 503w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-07-300x175.png 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/p>\n<p>You now have the names thanks to Modulo in Power Query!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Process Flat Data Using Modulo in Power Query\"  class=\"aligncenter size-full wp-image-11117\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-08.png\" alt=\"Process Flat Data Using Modulo in Power Query\" width=\"366\" height=\"155\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-08.png 366w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/02\/Process-Flat-Data-using-Modulo-08-300x127.png 300w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff;\"><strong>How to Process Flat Data Using Modulo in Excel Using Power Query<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/100-39.html\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2017\/07\/530x300.jpg\" alt=\"Free Excel Macros &amp; VBA Webinar Training\" width=\"530\" height=\"300\" title=\"\"><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Power Query\u00a0or Get &amp; Transform (In Excel 2016) lets you perform a series of steps to transform your Excel data. \u00a0One of the steps it allows you to take is to process flat data via the Modulo calculation in Power Query. This is a really cool trick that you have to see! In our table, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":17733,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[120,121],"tags":[578,577,117],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/11103"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=11103"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/11103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/17733"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=11103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=11103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=11103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}