cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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

4 REPLIES 4
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

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

Super User IV
Super User IV

@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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a 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






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
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors