Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
AndyHermle
Helper I
Helper I

Two decimal places for values below 5K in a bar chart

Dear Experts: 

 

the following measure displays values smaller than 5.000 (5K) with two decimal places, e.g., 3,24K or 0,75K if I use the measure in a table visual. In Germany the thousand separator is the 'period' and the comma is the decimal separator. 

 

The trouble is that I cannot use this measure in a bar chart since the FORMAT function converts the numeric result into a text string. Bar charts in Power BI require numeric values for the Y-axis, which is why My TotalSales-Measure  could only be added to the Tooltips field bucket and not the Values field bucket.

 

TotalSales = IF(
    (Sum('DataSource'[Umsatz]))/1000 < 5,
    Format((Sum('DataSource'[Umsatz])/1000),"0.00K", "de-DE"),
    Format((Sum('DataSource'[Umsatz])/1000),"#,#00K", "de-DE")
    )
 
So, here comes my question? Am I getting this right, I CAN NOT use a custom format in a bar chart so that the bar chart looks like this after having applied a custom format. Help is very much appreciated. Thank you very much in advance. 
 
Regards, Andreas

custom-format-bar-chart.png


1 ACCEPTED SOLUTION
Deku
Super User
Super User

You can use the same logic to apply dynamic formatting to the measure

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

2 REPLIES 2
Deku
Super User
Super User

You can use the same logic to apply dynamic formatting to the measure

 

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

HI Deku, thank you very much for these insights. This looks challenging at first glance, but I will work thru the whole matter. Thank you again.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.