4 Replies Latest reply: Jan 15, 2017 1:13 PM by Stefan Wühl

# a count value dated yesterday

Hi,

howto to count a value dated Yesterday?

Example:

N°     STATUS          PROGRC          day

1          Closed        10                    monday

2          Closed         6                     tuesday

3          New              72                  wednesday

4          Closed          23                   thursday

5          Closed         1                    friday

6              -                    -                    -

7              .                    -                    -

......

Normally I use (UI) (char bar)

x: day

y: sum({<STATUS = {'Closed'}>} [PROGRC])

now I have to add the value of the previous day

x: day

y: sum({<STATUS = {'Closed'}>} [PROGRC]) + value of previous day if status is Closed

So that

Monday 10 + 0

Tuesday 6 + 10

Wednesday 72

Thursday: 23 + 72

Friday: 1 + 23

Howto calculate it?

• ###### Re: a count value dated yesterday

Wednesday is STATUS = New, so why do you consider 72?

You can maybe use chart inter record functions like above() to get the previous day results:

=sum({<STATUS = {'Closed'}>} [PROGRC]) + Above( sum({<STATUS = {'Closed'}>} [PROGRC]) )

edit:

or maybe better

=Rangesum( sum({<STATUS = {'Closed'}>} [PROGRC]) , Above( sum({<STATUS = {'Closed'}>} [PROGRC]) ) )

• ###### Re: a count value dated yesterday

Hi,

your answered is correct and I would like to add an additional sum?

The last formula I added the field 'Rest (green)

sum({<STATUS = {'New'}>} [PROGRC]) + Above( sum({<STATUS = {'New'}>} [PROGRC]) ) + 'Rest'

PS: MY ORIGINAL FORMULA IS A "COUNT" STATEMENT

• ###### Re: a count value dated yesterday

In case if you don't intend to show Wednesday as Stefan asked,

here is another way to achieve what you are looking for.

Set Accumulation to 2 Steps back.

Firs chart without Previous day,

Now after previous day ( Previous Bar  in this case ,to be precise)