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.
I try to convert a column of number to text, with padding '0' on the left. How do I do?
FOr example:
Number:
90
9
123
I would like to convert it to a text with 6 chars:
"000090"
"000009"
"000123"
Solved! Go to Solution.
@simonxiaoss , You can do that with Power Query/M in Edit Query/Transform Data mode
https://docs.microsoft.com/en-us/powerquery-m/text-padstart
Text.PadStart([colum1], 6, "0")
In DAX
REPT("0",6-len([colum1]) ) &[colum1]
You have create a new column
@simonxiaoss , You can do that with Power Query/M in Edit Query/Transform Data mode
https://docs.microsoft.com/en-us/powerquery-m/text-padstart
Text.PadStart([colum1], 6, "0")
In DAX
REPT("0",6-len([colum1]) ) &[colum1]
You have create a new column
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.
User | Count |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |