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
Highlighted
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
Highlighted
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

Highlighted
Green Belt

Re: Stylize a Value and Round

Is there a way to round to 2 decimal places?

Highlighted
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
Coming Soon: Weekly Virtual User Meet-ups to answer all your questions! Stay tuned for more details to come this week.