Hi, If I have data in a csv file it imports nicely. ColumnA,ColumnB "R1C1","R1C2" The first issue is that if I swap the columns around and get data again I am prompted to override the existing the dataset, the columns are ignored and the data is imported as though it is the original file - no warnings. ColumnB,ColumnA "R1C2","R1C1" "R2C2","R2C1" Imports as ColumnA,ColumnB "R1C2","R1C1" "R2C2","R2C1" The second issue is that if I then add ColumnC, Get Data again, I am once again prompted to override the existing dataset. This time however it says that there is an error and the data is then lost. Surely at that point you should be given the option to undo the change? Kind regards Gavin See http://community.powerbi.com/t5/Service/Issues-with-CSV-files/m-p/62477
4 Comments
- gavinhuetNew MemberNo text was lost, I can see all the text. Not sure it can be classed as "working as expected". Surely the import should check the file header for changes, not just the file name. And if there are any differences it should allow the option to continue or cancel. A change such as an additional column being added to the end of the file should not cause this kind of issue, over time most datasets would have more columns added.
- gavinhuetNew MemberHi Charles, Thanks for your help and the explanation. The Desktop version it is then... Regards Gavin
- chass
Impactful Individual
Hello Gavin, The reason i say it is probably working correctly is the same reason the advanced editor steps were requested in your forum post-which is to see what steps are being applied. If you look at the desktop version of this process, you will see the steps look something like those below. Those steps assume two columns (see the source line) and the first row is assumed to be the headers. When you add a column the system doesn't know if the CSV was corrupt or this was an intentional change. Adding columns to the same dataset can be supported in the M language and the Desktop version...In that scenario you are deciding how to handle the data change scenario. (like the suggestion in the forum) Does that make sense? let Source = Csv.Document(File.Contents("C:\Users\chass\Documents\one.csv"),[Delimiter=",", Columns=2, Encoding=1252, QuoteStyle=QuoteStyle.None]), #"Change Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}}), #"Promoted Headers" = Table.PromoteHeaders(#"Change Type") in #"Promoted Headers" Here is an example of people using M to modify/control the data import: https://social.technet.microsoft.com/Forums/en-US/1e40ed70-3c61-4829-ba38-85bb2e9438b0/promote-multiple-rows-to-header?forum=powerquery - fbcideas_migusrNew MemberStatus added:Completed
Recent ideas
How to Back Up and Restore a Fabric Lakehouse for Debugging
Is there a way to clone a Lakehouse, including its data, in Microsoft Fabric? When we encounter a data issue in Production, our usual approach is to take a backup of the database, restore it to a se...gsrinivasan1 hour agoNew MemberNew34Views0likes1CommentTenant Administration for Fabric Cloud Connections - Enterprise Governance Gap
Microsoft Fabric currently provides robust security around cloud connections by treating them as user-owned securable resources. While this model works well for personal connections, it creates signi...hrenollet2 hours agoRegular VisitorNew76Views7likes1CommentEnable Ownership Change / Take‑Over for Mirrored Database Items in Fabric
Mirrored DBs do not support ownership transfer today. This becomes an issue when someone leaves the company. And the user tied to the ownership is beeing disabled. That means you need to recreate the...Sigurd4 hours agoNew MemberNew866Views25likes3CommentsOption to hide item counts in filter pane
Allow report authors to hide counts displayed next to filter values while preserving filtering functionality. Currently, Power BI displays record counts next to values in filter panes and certain s...saul_galdamez6 hours agoNew MemberNew18Views0likes0CommentsAllow Detect Data Changes for Historic Data Outside Incremental Window
In Power BI Incremental Refresh,Detect Data Changes only works inside the incremental refresh window. If historic data gets updated, Power BI cannot detect or refresh it unless I expand the increment...NAGAKEERTHI_Y10 hours agoNew MemberNew119Views1like1Comment