Skip to main content

Hi

I am trying to conditional format the color on a running total field. The running total field is calculated.

Conditional Formatting (Colors) on Running totals

 

Here is how i need the color formatted

if the running total < 0 - Red

If running total is >0 but less than next weeks N-Demand value - Yellow

If running total is >0 and greater than next weeks N-demand value - Green

 

So in this case for Instrument XYZ

Assume that demand is all positive (shown as negative in the viz)

Running total for Week 15 through 17 - Green

Week 18- Yellow

Week 19 - Yellow

 

How do i get this? Also i need only the running total calculated field colored and not the N demand and N supply fields.  I was able to do a binary red or not by assigning a default white color to everything >=0 and red to everything<0, however this requirement is more nuanced.

 

Viz attached - appreciate inputs

Adi

3 answers
  1. Jan 8, 2021, 8:55 PM

    Hi @Adi Ramani​ 

     

    Here is a simple solution to your problem using RUNNING_SUM()

     

    Hi @Adi Ramani​ Here is a simple solution to your problem using RUNNING_SUM() I have attached the twbx file below. Let me know if you have any questions. 

    I have attached the twbx file below. Let me know if you have any questions.

    Hope this is helpful and correctly answers your question.Take care and

    Best wishes !

     

    Sincerely,

    Soumitra

0/9000