Re: Help writing an HTML Beast Mode

Greetings, 

 

Can someone help me out with writing an HTML beast mode? I want the sum of this beast mode to display red if negative and green if positive. 

 

Can you help me out?

 

Beast mode: 

 

SUM(`OrderDollars`) - ('929846')

 

Comments

  • case
    WHEN SUM(`OrderDollars`) - ('929846') > 0 then
    CONCAT('<div style="background-color:#9CD58D; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', SUM(`OrderDollars`) - ('929846'),'</div>')

    WHEN SUM(`OrderDollars`) - ('929846') < 0 then
    CONCAT('<div style="background-color:#fcbcb7; width: 100%; height:100%; margin:-20px; padding:20px"><a href="#">', SUM(`OrderDollars`) - ('929846'),'</div>')
    else
    concat(`Decision Date - TOR Date`,'')
    end

  • Is there a reason that you don't just want to use color rules?

  • To be honest, I'm not exactly sure on how to apply a color rule against it. Do you have a suggestion?