This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
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
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.