Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

replace number to string

           Hi, 

              How to convert "99990.0%" to NA, others remain same? I tried to use if statement, but got error message. Thanks!

                 

3 Replies

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi Anonymous, 

     

    If values 999900.0% and 100.0% come from a measure, you can modify the measure like below: 

     

    Measure=IF(MAX(Table1[Column1])=9999,"N/A",MAX(Table1[Column1]))

     

     

    Best Regards,
    Qiuyun Yu 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Yu,

                 thanks for reply. The column comes from table(not calculated measure or calculated column). I applied the formular "Measure=IF(MAX(Table1[Column1])=9999,"N/A",MAX(Table1[Column1]))"
      which you provided , but I got the error message:

                   I can't replace 99999 to 0,  have to replace 9999 to NA for business purpose. Another solution?

                   Thanks!

      • SivaMani's avatar
        SivaMani
        Resident Rockstar

        Anonymous,

         

        Please do try the below one,

        Measure=IF(MAX(Table1[Column1])=9999,"N/A",FORMAT(MAX(Table1[Column1],"0.0%")))