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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
sakshimit
Microsoft Employee
Microsoft Employee

Line Chart Data Labels Custom Display Units

Hi,

 

I am using Line chart to display the data values which are in bytes. Currently the display unit is auto and hence it shows values in billions or Millions. I want to change the display Unit to Mega Bytes instead. Is there a way to do so?

 

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @sakshimit 

 

Your measure is using FORMAT to return a value.  FORMAT returns a string and you can't apply number formatting  like #,##0 \ MB to a string.

 

If you have a number you just type into Format area to apply the special formatting.

 

Further info here https://www.myonlinetraininghub.com/custom-formatting-strings-in-power-bi

 

Your original question said you wanted to format valuies in MB, but your measure is formatting them in KB, MB, GB etc.

 

So what is it you actually are trying to do?

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hi,

The MB requirements are met with the soution you provided. However, I wanted to extend it further to dynamically convert the values to KB, MB & GB. Is it possible to acheive the same?

sakshimit
Microsoft Employee
Microsoft Employee

I cannot find the option to Set the Display Format to #,##0 \MB. It is only showing text in the dropdown for Format.

DisplayFormat.png

PhilipTreacy
Super User
Super User

Hi @sakshimit 

 

Download example PBIX

 

Create a measure to convert Bytes to MB

Measure = SELECTEDVALUE('Table'[MB])/1024

 

Select the new Measure and Set the Display Format to #,##0 \MB

mbformat.png

 

Plot the measure

mbf1.png

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.