Forum Discussion
How to complete a field to get a fixed length with Power Query / M language
- 6 years ago
Thanks Anonymous I tried your suggestion with Text.PadStart function like this:
Text.PadStart([Label1 (txt)],16,"0") and it works fine!
Grazie 1000!
try using addcolumn with this formula:
Text.PadStart(Text.From([#"Label1 (txt)"]),16,"0")).
incidentally, for the excel version I would have this idea:
TESTO is the italian version of TEXT function RIPETI is for REPEAT and LUNGHEZZA is for LEN.
- Anonymous6 years agoNot applicable
Ma se il problema è, come mi viene il dubbio sia, la lettura di un codice fiscale come numero anziché testo, conviene piuttosto che affannarsi a cercare un rimedio, prevenire il problema in fase di caricamento dati.
Ad esempio, evitando che power query attui un cambio di tipo automatico sulle colonne che potrebbero sembrargli contenere dei nuemri invece sono testo a tutti gli effetti.
- klikk6806 years agoFrequent Visitor
i dati purtroppo sono in questo formato nel csv che mi inviano, più che chiedere ogni volta di cambiare il formato non posso...
grazie e buona giornata
--
- klikk6806 years agoFrequent Visitor
Thanks Anonymous I tried your suggestion with Text.PadStart function like this:
Text.PadStart([Label1 (txt)],16,"0") and it works fine!
Grazie 1000!