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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jburklund
Helper III
Helper III

Help with billions number formatting

I am trying to format the number $1,558,753,918 to read $1.56B

 

I would use the built in billions formatting but it uses "bn" instead of "B" after a number.

 

I have tried using the format function but the closest I got was $1B.

 

Thanks for your thoughts.

1 ACCEPTED SOLUTION

I used this and I am getting $1.56B

 

Measure = format(1558753918,"$#,,,.##B")
 
Just make sure the data which you are formatting is number.
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

These answers only work if you already know that you'll only have billions as a number, and if you only need text.
They don't work if you need to show $B, $M or $K depending on your values, and if you need to show that as a detail label on a pie chart.

Anonymous
Not applicable

You can create a new measure like this. The output data type will be text. Hope this works !
 
Item Sales B =
VAR number_ =
SUM ( promotions_performance_detailed[item_sales] )
VAR decimal = "0.0"
RETURN
IF (
number_ >= 1000000000,
FORMAT ( number_ / 1000000000, decimal & "B" ),
IF ( number_ >= 1000000, FORMAT ( number_ / 1000000, decimal & "M" ) )
)

This helped me a lot so thank you.

 

I added one piece to it to make it more dynamic if the value isnt in millions or billions. Just an 'else' clause to use the original column.

 

Changing the value, specifically the number of trainiling zero's, of 'VAR decimal = "0.0' allows you to change the number of decimals displayed.

 

Item Sales B =
VAR number_ =
SUM ( promotions_performance_detailed[item_sales] )
VAR decimal = "0.000" -- Editing this allows for more decimal places, currently set to 3.
RETURN
IF (
number_ >= 1000000000,
FORMAT ( number_ / 1000000000, decimal & "B" ),
IF ( number_ >= 1000000, FORMAT ( number_ / 1000000, decimal & "M" ), SUM ( promotions_performance_detailed[item_sales] ) )
)
v-chuncz-msft
Community Support
Community Support

@jburklund 

 

You may aslo try Custom format strings.

FORMAT ( [value], "$#,,,.00B" )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-chuncz-msft but this still just gets me to $1B. I need it to also show to the nearest millions, i.e. $1.56B.

Try giving ## after decimal too

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks but now I get $.01B

I used this and I am getting $1.56B

 

Measure = format(1558753918,"$#,,,.##B")
 
Just make sure the data which you are formatting is number.
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Can this be done to format percentages as well? I would like it to read 19.82% instead of 1982%

Thank you @amitchandak this worked, I think the way the variable was coming through was messing it up but if I type in the number it works.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors