Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
After I run an R script in Power Query one of my columns (which is text type and should stay that way) gets changed to number.
How do I stop Power Query or Power Bi from doing this?
Thanks
I'm not sure what I've done but suddenly when I clicked on Transform File under Transform File from Query there was this statement where I could change type from Int64.Type to type Text. That is the moment where the data were prevously corrupted.
Here is the statement for reference if someone would need it:
= (Parameter2 as binary) => let
Source = Excel.Workbook(Parameter2, null, true),
Tabela2_Table = Source{[Item="Table2",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(Tabela2_Table,{{"NAME ", type text}, {"SURNAME", type text}, {"DATE OF BIRTH", type date}, {"WORKING PERIOD BEFORE", type text}})
in
#"Changed Type"
I have the same issue while importing excel file from Sharepoint. The column in excel is text type and content is predefined as yymmdd (working period before employed in our company). After importing PowerQuery automatically changes text to number and I get useless data. Probably solution could be if we enter data in excel in this form: '000510 but users could forget about that and issue would arrize again.
Is there any option to prevent PowerQuery from changing data type or force a type before data are corrupted?
I would really appreciate any feedback.
Regards,
Mila