Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi I have values in a table that are char 3 or 2, how can I change in char 4?
example : 170 I want to turn it into 0170
Hi @Marcox28,
You can also try the function FORMAT.
Column = FORMAT([Column1], "0000")
Best Regards,
Dale
Hi,
As per your question your values are either of 2 or 3 characters. You can use concatenate function. create a column where you should check length of your character. If it is less than 3 then concatenate it with "00" and if length of character =3 then concatenate it with "0".
check the below expression if this works as per your requirements.
column = if(LEN(your field)<3,CONCATENATE("00",your field),if(LEN(your field)=3,CONCATENATE("0",your field))). Check teh screenshot below.
Thanks,
Atish
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 124 | |
| 105 | |
| 44 | |
| 32 | |
| 24 |