Forum Discussion

RAHEEL's avatar
RAHEEL
Helper I
8 years ago
Solved

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

  • 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"))
     

2 Replies

  • 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"))
     

    • RAHEEL's avatar
      RAHEEL
      Helper I

      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 ?