Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
TDouglassAFG
Frequent Visitor

formatting to left pad column with zeros

Hi,

 

I have a tabular model in Visual Studio that creates a cube in analysis services for Power BI to read.  I have the same source table in two .bim's/solutions and the same calculation 

= format('Product'[Product_Code],"00000") & " - " & 'Product'[Product_Name]

 

However, the format is not working in one of them.  The product code is 2800.  It should be 02800 with this command.  Is there a different way I should be writing this now?  The other .bim was written over a year ago and still works ok.

TDouglassAFG_0-1619555773335.png

 

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @TDouglassAFG ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem with yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi @TDouglassAFG ,

Could you please check whether the data type of field is Text type? If yes, please set its data type as numeric type if the data is all numeric...

yingyinr_0-1619757351998.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.