cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Community Support

Hi, @shaunmag

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:

Best Regards

Allan

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

5 REPLIES 5
Community Support

Hi, @shaunmag

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:

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?

Super User

You can use Data format at Visual level

Helper II

HI @amitchandak ,

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

Super User

@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.

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors