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
RAHEEL
Helper I
Helper I

Formula for Number to Text

Dear All, 

I have a bin column and i want to change the lable of one bin and rest defaults. I am currently using below formula but giving me error mentioned below. Kindly assist. I am unable to find any formula to convert number into text

 

NewBinName = IF('datasheet'[Total Expereince (bins)]=0,"< 3", 'datasheet'[Total Expereince (bins)])

 

Error: Expressions that yield variant data-type cannot be used to define the calculated column

1 ACCEPTED SOLUTION
RAHEEL
Helper I
Helper I

Ok I have used below and it worked for me ....

 

 

NewBinName = IF('datasheet'[Total Expereince (bins)]=0,"< 3",FORMAT('datasheet'[Total Expereince (bins)],"General Number"))
 

View solution in original post

2 REPLIES 2
RAHEEL
Helper I
Helper I

Ok I have used below and it worked for me ....

 

 

NewBinName = IF('datasheet'[Total Expereince (bins)]=0,"< 3",FORMAT('datasheet'[Total Expereince (bins)],"General Number"))
 

BUT the problem now is sorting...after applying new lables it has disturbed the sorting order...

I want sorting to remain with the base variable ?

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.