- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Vega lite - Show number in Billions with B instead of G
I am trying to format the numbers in this axis in the millions/billions, and I want it to show more labels. However, I am having an issue. When I try "format": "$,.2s" it works fine, except it shows G instead of B for billions. I know this is scientifically correct, but my colleagues will expect B for billions. Is there any way to change the G to B?
The other possible solution would be to only show millions. So instead of $1.2G it would show $1,200M.
Please let me know any suggestions! Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @asodie ,
You can use custom format strings in Power BI Desktop, which allows you to define the format of your columns.
Go to Model view -> Choose the target column -> Formatting -> Format
$#0,,,B
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi,
Thanks for your answer. This seems to work well if all numbers are in billions, but my numbers range from 0 to the billions. It also doesn't seem to have an effect on Vega-lite visuals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

is it possible that you can use the dynamic format feature for the measure ?
let me know if this helps.
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Thanks for this option. I haven't used dynamic formatting before, can you provide more details on how you connected that dynamic formatting measure to the currency column?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

when you select a measure
go to measure tools --> format --> chose dynamic .
now you can alternate between the measure and format
you can use switch for formatting, example,
if less than billion, format it this way,
if more than 1 billion, format it another way .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Does it work for a column? The currency value I am using is a column, not a measure. Can I connect the dynamic formatting measure to the column?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
08-01-2023 03:49 AM | |||
10-31-2024 04:18 PM | |||
02-13-2024 11:10 AM | |||
02-15-2023 02:47 AM | |||
Anonymous
| 08-08-2024 02:30 AM |
User | Count |
---|---|
137 | |
107 | |
85 | |
59 | |
46 |