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
Anonymous
Not applicable

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?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I solved it like this 🙂

AMRM_342_0-1630411725614.png

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I solved it like this 🙂

AMRM_342_0-1630411725614.png

 

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

SivaMani
Resident Rockstar
Resident Rockstar

@Anonymous ,

Try this setting for the mentioned column,

SivaMani_0-1630403695202.png

 

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

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.