Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Different format in the same column

Hello.

 

I have a column that has numbers with and without decimals. I need it to display one decimal value ONLY when it is higher than 0. So, for example

1,236

4,521.5

864.1

156

 

At the moment, it is showing like:

1,236.0

4,521.5

864.1

156.0

 

Any idea which custom format can I use?

  • Anonymous's avatar
    Anonymous
    5 years ago

    I solved it like this 🙂

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I solved it like this 🙂

     

  • SivaMani's avatar
    SivaMani
    Resident Rockstar

    Anonymous ,

    Try this setting for the mentioned column,

     

    • SivaMani's avatar
      SivaMani
      Resident Rockstar

      Anonymous , Can't change it further with Decimal Datatype.

      You can create a calculated column with FORMAT() function but it will be a text column (not numeric)

       

      Column = IF('Table'[Column] > 0, FORMAT('Table'[Column],"0.0"),FORMAT('Table'[Column],"0"))
  • Anonymous's avatar
    Anonymous
    Not applicable

    I have it like this at the moment but it shows me a 0 when there is no decimal. I need it to show me decimals only when the value has decimals