Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I'm having a frustrating problem with Power Query in Power BI. The data source is a .csv. There are just nine rows of data in the .csv itself, plus a header row making ten. However, Power Query is displaying it as 13 rows. It does this from the very beginning - i.e. if I click on the Applied Step "Source", it is already like that.
I have figured out that it seems to be splitting lines where the Start Date field is null - but why?
Here is the code generated. Any hints much appreciated.
let
Source = Csv.Document(File.Contents("C:\Users\MyName\MyOrg\Filepath\AllCommunityEvents.csv"),[Delimiter=",", Columns=22, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Community Event ID", type text}, {"Event Type", type text}, {"Registration Date", type date}, {"Event Name", type text}, {"Event Description", type text}, {"Start Date", type date}, {"End Date", type text}, {"Serial Number", Int64.Type}, {"Supporter Type", type text}, {"Event Status", type text}, {"Event Category", type text}, {"Origin", type text}, {"Source Code", type text}, {"Suggested Destination Code", type text}, {"Event Manager", type text}, {"Initial Fundraising Target", Int64.Type}, {"Fundraising Target", Int64.Type}, {"Total Raised", Int64.Type}, {"Total In Progress", Int64.Type}, {"Created", type datetime}, {"Created By", type text}, {"Entity Ref Type", type text}})
in
#"Changed Type"
Thanks,
Sophia
Solved! Go to Solution.
Try using just this in your Source step, so you see how it looks with the default values.
Csv.Document(File.Contents("C:\Users\MyName\MyOrg\Filepath\AllCommunityEvents.csv"))
Csv.Document - PowerQuery M | Microsoft Docs
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hold the phone - I've solved it! I changed QuoteStyle.None to QuoteStyle.Csv. Thank you so much for the tip.
Try using just this in your Source step, so you see how it looks with the default values.
Csv.Document(File.Contents("C:\Users\MyName\MyOrg\Filepath\AllCommunityEvents.csv"))
Csv.Document - PowerQuery M | Microsoft Docs
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Aha! Thanks @mahoneypat , when I do that, there are just 9 rows, and they all look accurate.
Do you have any ideas on which part of the source settings might be the problem?
Hold the phone - I've solved it! I changed QuoteStyle.None to QuoteStyle.Csv. Thank you so much for the tip.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.