Stylize a Value and Round

Reply
Highlighted
Green Belt

Stylize a Value and Round

When I do something like:

 

CONCAT('<span style="color:#00CC00">',(ValueA - ValueB),'</span>')



I get a lot of trailing decimal places. When I try to round that value, it doesn't work. Any ideas how I can just get a whole number when stylizing?


Accepted Solutions
Black Belt

Re: Stylize a Value and Round

Have you tried adding FLOOR() to it ?

 

like this:

 

CONCAT('<span style="color:#00CC00">',FLOOR(ValueA - ValueB),'</span>')

 That should return a whole number.

Domo Arigato!

**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'

View solution in original post


All Replies
Black Belt

Re: Stylize a Value and Round

Have you tried adding FLOOR() to it ?

 

like this:

 

CONCAT('<span style="color:#00CC00">',FLOOR(ValueA - ValueB),'</span>')

 That should return a whole number.

Domo Arigato!

**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'

View solution in original post

Green Belt

Re: Stylize a Value and Round

Is there a way to round to 2 decimal places?

Black Belt

Re: Stylize a Value and Round

Yes, Do this

 

CONCAT('<span style="color:#00CC00">',ROUND((ValueA - ValueB),2),'</span>')
Domo Arigato!

**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'
Announcements
Check out these great solution videos! The new iSolveditWithDomoboard is live, share yours and earn higher rankings in Dojo click here!