{"id":121,"date":"2022-04-01T13:57:08","date_gmt":"2022-04-01T13:57:08","guid":{"rendered":"https:\/\/powerbikiss.com\/?p=121"},"modified":"2022-09-13T17:29:08","modified_gmt":"2022-09-13T17:29:08","slug":"power-bi-how-to-see-new-columns-in-a-csv-file","status":"publish","type":"post","link":"https:\/\/powerbikiss.com\/?p=121","title":{"rendered":"Power BI, how to see new columns in a CSV file"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-3-300x140.png\" alt=\"This image has an empty alt attribute; its file name is image-3-300x140.png\"\/><\/figure>\n\n\n\n<p>When working with Power BI, what happens when you have a new column added to you CSV file?<\/p>\n\n\n\n<p>When you refresh your data there is a very strong chance you won&#8217;t see the new column in you dataset.  So how do you get Power Query to see the new column? Read on for the answer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-1-1024x113.png\" alt=\"\" class=\"wp-image-125\" width=\"840\" height=\"92\" srcset=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-1-1024x113.png 1024w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-1-300x33.png 300w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-1-768x84.png 768w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-1.png 1083w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><figcaption>Picture 1<\/figcaption><\/figure>\n\n\n\n<p>In this example we have 5 columns in Power Query as Picture 1 shows. However Picture 2 shows there are 6 columns in the actual data. Note new Column called <strong>Tax<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-2.png\" alt=\"\" class=\"wp-image-126\" width=\"521\" height=\"207\" srcset=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-2.png 521w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-2-300x119.png 300w\" sizes=\"auto, (max-width: 521px) 100vw, 521px\" \/><figcaption>Picture 2<\/figcaption><\/figure>\n\n\n\n<p>To fix this go to the <strong>Source <\/strong>step in Applied Steps<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"394\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-4.png\" alt=\"\" class=\"wp-image-128\" srcset=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-4.png 490w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-4-300x241.png 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><figcaption>Picture 3<\/figcaption><\/figure>\n\n\n\n<p>When you look at the formula bar, you&#8217;ll see that the number of columns that were in the data when you first imported have been hard coded into the Applied Steps&#8230;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"73\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-5-1024x73.png\" alt=\"\" class=\"wp-image-129\" srcset=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-5-1024x73.png 1024w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-5-300x21.png 300w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-5-768x55.png 768w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-5.png 1047w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Picture 4<\/figcaption><\/figure>\n\n\n\n<p>So to solve this just delete the statement <strong>Columns=5,<\/strong> including the comma, from the formula bar. Once done you will see the extra column returned in the query.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"205\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-6.png\" alt=\"\" class=\"wp-image-130\" srcset=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-6.png 1024w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-6-300x60.png 300w, https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-6-768x154.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Picture 5<\/figcaption><\/figure>\n\n\n\n<p>So there you have it. To ensure that all columns are returned in Power Query when working with a CSV or TXT file, remove the hard coded column count from the first step. This will ensure that all new columns will automatically be added to the query. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/powerbikiss.com\/wp-content\/uploads\/2022\/04\/image-9.png\" alt=\"\" class=\"wp-image-133\"\/><\/figure>\n\n\n\n<p>If you&#8217;d prefer to watch a video on how to do do then here you go:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to see new columns in a CSV file in Power BI\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/brpHgDh-_iI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When working with Power BI, what happens when you have a new column added to you CSV file? When you refresh your data there is a very strong chance you won&#8217;t see the new column in you dataset. So how do you get Power Query to see the new column? Read on for the answer. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4],"tags":[10,8,9],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-power-bi","tag-dataflows","tag-powerbi","tag-powerquery"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/powerbikiss.com\/index.php?rest_route=\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/powerbikiss.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/powerbikiss.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/powerbikiss.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/powerbikiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=121"}],"version-history":[{"count":3,"href":"https:\/\/powerbikiss.com\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":138,"href":"https:\/\/powerbikiss.com\/index.php?rest_route=\/wp\/v2\/posts\/121\/revisions\/138"}],"wp:attachment":[{"href":"https:\/\/powerbikiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/powerbikiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/powerbikiss.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}