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
Eyal
Helper II
Helper II

conditional different number formatting based on number length

Hi all

 

I have a table that have number ranging from 2 digit after the decimal (0.xx) point up to tens of thousends (10,000).

I would like to format the Values such that:

(1) values up to 500 will be displyed with a format of 2 decinal point (e.g. 111.22 / 0.22).

(2) values abouve 500 will have a K symbole (e.g 500=>0.5K / 5000=>5K / 50000=>50K)

 any ideas on how to do that?

 

thanks 

Eyal

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Eyal ,

 

Create a measure as below:

 

Measure = IF(MAX('Table'[Column1])<500,FORMAT(MAX('Table'[Column1])/1000,"fixed"),CONCATENATE(MAX('Table'[Column1])/1000,"k"))

 

And you will see:

Annotation 2020-07-07 165338.png

For the related .pbix file,pls click here.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @Eyal ,

 

Create a measure as below:

 

Measure = IF(MAX('Table'[Column1])<500,FORMAT(MAX('Table'[Column1])/1000,"fixed"),CONCATENATE(MAX('Table'[Column1])/1000,"k"))

 

And you will see:

Annotation 2020-07-07 165338.png

For the related .pbix file,pls click here.

 

 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Thank you @Anonymous 

the solution you provieded is as close as i can get. to only issue is that then the colmun is defined as text (not number).

 

thank you all for your support

Eyal

amitchandak
Super User
Super User

@Eyal , I doubt that is possible. You can do using formatting string, but that will make it as string

You can use swith and the format you want

https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings

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.