Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I have a column of numbers with a maximum length of 6 characters but with smaller lengths as well as in the following:
123456
782
5678
I want to reformat these as text but with a high order 0 fill where the field is less than 6 characters long. The result would then look like:
123456
000782
005678
I have been using a Dax formula as follows:
Solved! Go to Solution.
The formula is right if the numbers are in numeric format. So to make sure it is numeric, we can add the function VALUE as follows:
EmpID as text = format(VALUE(BLASTSRESPONSE[EmpID]),"000000")
and make sure the formula is in a calculated column, not a measure
Thank you Yelsherif. It is working now.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 39 | |
| 35 | |
| 23 |