Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Format string

In the following table as example :

Table1

column
-1,14
-0,07
0,67
1,00
-2,77

which format string should be used to get this result:

 

column
-1,14%
-0,07%
0,67%
1,00%
-2,77%

(',' is for decimal number -2,77 =-2.77)

I know there are other ways in tabular to do this but I should do this with Format function.

7 Replies

  • Anonymous 

    In our example both numbers have "," Do you need to convert to "," or "." 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Fowmy 

      I need to convert to ','(as example shows)  . I only wanted to be clear ğŸ™‚

      • Fowmy's avatar
        Fowmy
        Super User

        Anonymous 

        Not quite clear about what you are trying to do but add the following column to convert :

        Column = SUBSTITUTE(SUBSTITUTE(Table2[Column1],",","."),"%","") /100

         

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    One solution is to change the column to percentage directly from DATA >>Column Tools >> Formatting.  

     

     

     

     

    you can also format your column using DAX

    Column = FORMAT(DIVIDE(Sheet1[Profit],10000),"percent")

     

    And if you want to convert "," to "." then use the following DAX, and to convert it into percentage use the above steps.

    column = SUBSTITUTE(Sheet1[Profit],",",".")