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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Anonymous
Not applicable

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

Anonymous
Not applicable

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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