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
shaunmag
Helper I
Helper I

Format numbers to thousands / millions in multi row card visual

I have a multi-row card, that shows a range of numerical values ranging from 10 up to 10 million.

 

I would like to format each individual value to be shown in the most appropriate unit (thousands / millions etc), depending on its value.

 

In the Format > Data Labels pane, there is no option to do this.

 

Does anyone have any idea how I can get around this?

 

Thanks

1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @shaunmag 

 

Based on your description, I created data to reproduce your scenario.

Table(a calculated table):

 

Table = GENERATESERIES(10,100000000,1)

 

 

You may create a measure like below.

 

FormatedValue = 
var _value = SELECTEDVALUE('Table'[Value])
return
SWITCH(
    TRUE(),
    _value>=10&&_value<=99,(_value/10)&" ten digits",
    _value>=100&&_value<=999,(_value/100)&" hundreds",
    _value>=1000&&_value<=999999,(_value/1000)&" thousands",
    _value>=1000000,(_value/1000000)&" millions",
    _value
)

 

 

Result:

a2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
v-alq-msft
Community Support
Community Support

Hi, @shaunmag 

 

Based on your description, I created data to reproduce your scenario.

Table(a calculated table):

 

Table = GENERATESERIES(10,100000000,1)

 

 

You may create a measure like below.

 

FormatedValue = 
var _value = SELECTEDVALUE('Table'[Value])
return
SWITCH(
    TRUE(),
    _value>=10&&_value<=99,(_value/10)&" ten digits",
    _value>=100&&_value<=999,(_value/100)&" hundreds",
    _value>=1000&&_value<=999999,(_value/1000)&" thousands",
    _value>=1000000,(_value/1000000)&" millions",
    _value
)

 

 

Result:

a2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

This solution worked fine. But is there a way we can have something similar in pie charts?

amitchandak
Super User
Super User

@shaunmag ,

Refer: https://community.powerbi.com/t5/Desktop/measure-for-converting-numbers-to-million/td-p/589524

You can use Data format at Visual level

dataFormat at Visual level.png

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

HI @amitchandak ,

where is this functionality in the new format pane? I can´t find it.

@shaunmag in multi row card you don't have the option to set display units, you need to pre-format your values before using in this visual.

 

Ask anything Power BI. Book appointment for a free consultancy at https://www.perytus.com



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.