# Convert number to Billions in DAX

How to convert a number into billions with 2 decimal places using DAX

Hello @Anu,

Thank You for posting your query onto the Forum.

You can use the FORMAT function to convert the figures. For example to convert the numbers into thousands ('000) write the expression as follows -

`FORMAT( [value] , "0,000.00")`

OR

`FORMAT( [value] , "#,###.##")`

Similarly, follow the approach to convert the figures into the billions.

But just remember once you use the FORMAT function the number gets converted into the text format because weâ€™ve used symbol in it i.e. (comma as a separator).

Hoping you find this useful and meets your requirements that youâ€™re looking for.

Thanks and Warm Regards,
Harsh

I understand the format function can be used, for thousand seperator etc, but i want it to look like â€ś2.13Bâ€ť say, I am not able to get this particular formatting.

Hello @Anu,

` Format = FORMAT( [value] , "\$ 0,,,.##B" )`

Iâ€™m providing the screenshot below of the result as well as attaching the working of the PBIX file for reference.

Hoping this helps you.

Thanks and Warm Regards,
Harsh

Billions Format.pbix (661.6 KB)

1 Like

Also if i want to format % without decimal places, how to do? using dax.

Hello @Anu,

Can you please provide an example for it?

Thanks and Warm Regards,
Harsh

You can refer to the documentation here:

at the end of the article there are more links you can follow to discover other formatting options using the FORMAT() function in DAX.

If i use Format (value,â€śPercentâ€ť) it will give 97.45%
But i only want 97%

Hi @Anu,

If you follow this link which was at the bottom of the documentation page, you will learn about custom User-defined numeric formats.

I believe this should do it.
`FORMAT(value, "#%")`

Could you explain a bit, why are 2 commas used?

Hello @Anu,

Well actually to convert the numbers into the billions I had put 3 commas and a full stop as a decimal separator. For converting them into millions use only 2 commas and for thousands use only a single comma.

Iâ€™m providing a screenshot below of the results that Iâ€™ve mentioned.

Iâ€™m also providing a link that I used as an reference that provides an explanation about formatting the numbers (although theyâ€™re used in the Excel) but same concept was applied here as well). The only thing is theyâ€™ve applied it directly under the Formatting tab in Excel so theyâ€™ve included words under the quotes and have excluded 0 and commas from it.

Lastly, also attaching the PBIX file of the working as well as providing a link below of the similar type of query asked onto the Power BI Community Forum.

Hoping you find this useful and and helps you in better understanding about the formatting of numbers.

Thanks and Warm Regards,
Harsh

Billions Format - Harsh.pbix (662.3 KB)

https://www.extendoffice.com/documents/excel/3771-excel-format-numbers-in-millions.html

1 Like