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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

How can i convert "-" to 0 (zero)

Hi, i have a column which is include celebrities' instagram followers count. But this column includes values as text data type. Furthermore, if an celebrity do not have any instagram account followers count is shown as "-". How can i convert "-" to 0 (zero). Then how can i convert text data type to integer?

Thank you.

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @Anonymous 

you can create a another column with below code:-

 

 

Column = IF('Table (4)'[Column1] = "-",0,INT('Table (4)'[Column1]))

 

 

image.png

Or in case you dont want to create a new column then in transform data tab you can right click on your column and select replace value

Samarth_18_0-1630404494742.png

 

and replace "-" with 0

image.png

click ok, Now on the top from the transform ribbon change data type to whole number:-

Samarth_18_1-1630404629169.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
Samarth_18
Community Champion
Community Champion

Hi @Anonymous 

you can create a another column with below code:-

 

 

Column = IF('Table (4)'[Column1] = "-",0,INT('Table (4)'[Column1]))

 

 

image.png

Or in case you dont want to create a new column then in transform data tab you can right click on your column and select replace value

Samarth_18_0-1630404494742.png

 

and replace "-" with 0

image.png

click ok, Now on the top from the transform ribbon change data type to whole number:-

Samarth_18_1-1630404629169.png

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Anonymous
Not applicable

Thank you, i solved my problem thanks to your suggestion.

Great! it helps you. Kindly accept my answer as solution so that it will help other to find it more quickly.

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors