Forum Discussion
Anonymous
2 years agoNot applicable
PowerQuery converting text to date automatically
Hi, I'm using PowerQuery to read in a .csv file. The key field for the file is a text field, and most records have a random alphanumeric string for this field, but I have a handful of records where ...
- Anonymous2 years ago
I'm not sure why, but I managed to get the data to ingest by modifying a filter step. Basically, I had a step that filtered on gift_date (the only Date field in the database), but changing that filter to be dependent on gift_fiscal_year (an Int) instead, seems to have made the model happy. Thanks for you help! I'm going to close this post now.
KNP
Super User
2 years agoThat doesn't sound right to me. If it is set to text it shouldn't be returning this error.
Do you have any other Change Type steps in your query?
If you can post the code from the advanced editor (hide any sensitive info) I'll be able to help you better.
Anonymous
2 years agoNot applicable
This is the code from the "Promoted Headers" / "Changed Column Type" step. "source_code" is the problem field.
Table.TransformColumnTypes(#"Promoted headers", {{"client", type text}, {"source_code", type text}, {"gift_fiscal_year", Int64.Type}, {"gift_calendar_year", Int64.Type}, {"gift_month", Int64.Type}, {"gift_date", type date}, {"program", type text}, {"campaign", type text}, {"camp_id", Int64.Type}, {"package_id", type text}, {"seg_id", type text}, {"package", type text}, {"campaign_fiscal_year", Int64.Type}, {"mailstats_flag", type logical}, {"channel", type text}, {"sub_channel", type text}, {"fund_description", type text}, {"gifts", Int64.Type}, {"revenue", type number}})