HELP CENTER

HELP CENTER

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Dojo
- :
- Using Domo
- :
- Card Building
- :
- Round function

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
01:15

08-04-2020
01:15

Hello, I have a beast mode that calculates a % and I need it to round to 2 decimals.

I'm using the round function as described in the documentation:

CONCAT(** ROUND(1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`)),2)***100, '%')

However, the result is being rounded to the whole number

I need it to, using the example above, display 97.91 instead of 98

What am I missing in my beast mode?

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
01:28

08-04-2020
01:28

You may not even need to round using a beast mode calculation. It seems like you are using a textbox chart, however for have you tried using the single value chart? It is a similar chart, and if you look in Chart Properties>General>Decimal Places, you will be able to select how many decimal places you would like to show.

Highlighted

**Was this post helpful? Click the heart icon**

**Did this solve your problem? Accept it as a solution!**

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
01:28

08-04-2020
01:28

Hi @MartinB

The display options for the field can handle all of this for you.

You can change your beast mode to be:

`1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`))`

Then click on the Beast mode atop your chart to open the menu and select Data Format > Display as and select Percentage with 2 decimal places. You can then also tell it to multiply by 100.

**Was this post helpful? Click the heart icon**

**Did this solve your problem? Accept it as a solution!**

Highlighted

Jae Wilson

Check out my Domo Training YouTube Channel

**Say "Thanks" by clicking the heart in the post that helped you.

**Please mark the post that solves your problem by clicking on "Accept as Solution"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-05-2020
02:04

08-05-2020
02:04

I know i'm late to the party, but @MartinB it's just basic math.

CONCAT(** ROUND(1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`)),2)***100, '%')

If you have 1/3 ( = .33333333) and you wrap that in round( 2) you'd get .33 so when you multiply by 100 you'd get 33.

if you wanted 33.33 then you do round(4).

Jae Wilson

Check out my Domo Training YouTube Channel

**Say "Thanks" by clicking the heart in the post that helped you.

**Please mark the post that solves your problem by clicking on "Accept as Solution"

All Replies

Highlighted
You may not even need to round using a beast mode calculation. It seems like you are using a textbox chart, however for have you tried using the single value chart? It is a similar chart, and if you look in Chart Properties>General>Decimal Places, you will be able to select how many decimal places you would like to show.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
01:28

08-04-2020
01:28

Highlighted

**Was this post helpful? Click the heart icon**

**Did this solve your problem? Accept it as a solution!**

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
01:28

08-04-2020
01:28

Hi @MartinB

The display options for the field can handle all of this for you.

You can change your beast mode to be:

`1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`))`

Then click on the Beast mode atop your chart to open the menu and select Data Format > Display as and select Percentage with 2 decimal places. You can then also tell it to multiply by 100.

**Was this post helpful? Click the heart icon**

**Did this solve your problem? Accept it as a solution!**

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
01:32

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
05:23

08-04-2020
05:23

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-04-2020
05:27

Highlighted

Jae Wilson

Check out my Domo Training YouTube Channel

**Say "Thanks" by clicking the heart in the post that helped you.

**Please mark the post that solves your problem by clicking on "Accept as Solution"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-05-2020
02:04

08-05-2020
02:04

I know i'm late to the party, but @MartinB it's just basic math.

CONCAT(** ROUND(1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`)),2)***100, '%')

If you have 1/3 ( = .33333333) and you wrap that in round( 2) you'd get .33 so when you multiply by 100 you'd get 33.

if you wanted 33.33 then you do round(4).

Jae Wilson

Check out my Domo Training YouTube Channel

**Say "Thanks" by clicking the heart in the post that helped you.

**Please mark the post that solves your problem by clicking on "Accept as Solution"

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-05-2020
10:52

08-05-2020
10:52

Silly me, this formula made the difference. Thanks @jaeW_at_Onyx

**CONCAT(ROUND(1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`)),4), '%')**

Still, had some trouble when adding strings either at the beginning or the end of the formula pasted above...until this I hit jackpot:

**CONCAT('Quality ', CONCAT(ROUND(100*1-(COUNT(DISTINCT `nc_list`) / COUNT(DISTINCT `lot_number`)),2), '% FPY'))**

Thanks to all, this is the solution I was looking for.

Announcements

Click here to submit your story.