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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Jeff2Jets
Helper III
Helper III

How to properly format a number into GB within a matrix

I have a matrix that totals sizes for files. I want to display the values in the matrix as K, M, G, or T. However, I cannot locate the option to do this. The best formatting option I can find is what I have highlighted below:

 

Jeff2Jets_0-1691672606861.png

If I choose Thousands or Millions, the value displays as K or M, respectively, as highlighted below:

Jeff2Jets_1-1691672796362.png

However, if I choose Billions, instead of showing G, bn displays, as highlighted below:

Jeff2Jets_2-1691672871853.png

Ultimately, I would expect Power BI to show K, M, G, or T dependent upon each value. If that isn't possible, does anyone have an idea on how I can have G displayed, instead of bn?

3 REPLIES 3
Jeff2Jets
Helper III
Helper III

Thanks for the help, I don't see any option for Power BI to automatically assign K, M, G, or T for a value in a matrix or for formatting the table column. For instance, if the value is 1024, I want to display 1K. If the value is 1048576, I want to display 1M, etc.

hello 

lets say you have a measure called total amount

create this emsaure to dynamically format 

 

Dynamic Label = 
SWITCH(
    TRUE(),
    LEN([Total Amount]) <4 , FORMAT([Total Amount],"#,##0"),
    AND(LEN([Total Amount]) >=4 ,LEN([Total Amount]) <7) , FORMAT([Total Amount],"#,##0, K"),
    AND(LEN([Total Amount]) >=7,LEN([Total Amount])<10)   , FORMAT([Total Amount],"#,##0,, M"),
    LEN([Total Amount]) >=10,FORMAT([Total Amount],"#,##0,,, Bn"
    ))

 

 

annonymous1999_1-1691678956664.png

 

 

Idrissshatila
Super User
Super User

Hello @Jeff2Jets ,

 

Try using custom format strings in Power BI https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-custom-format-strings

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.