cancel
Showing results for 
Search instead for 
Did you mean: 

Totalizer (Last Value)

Former Member
0 Kudos

I have a Tag Query Pulling back a Counter. I then apply the Totalizer action block to that.

How does Totalizer.Accumulator find the Value for the last row It doesn't actually know what the next value will be. It appears that It just "ASSUMES" that it will accumulate the same amount as the Second to last time. See my sample below.... Is that correct???


StartDateTime               MinRange      MaxRange       Value             CurrentFlow 
03/19/2008 21:00:00      358909.64      358995.19       358995.90             87.01 
03/19/2008 22:00:00      358996.63      359082.25       359082.91             87.06 
03/19/2008 23:00:00      359083.69      359169.36       359169.97             87.11 
03/20/2008 00:00:00      359170.83      359256.54       359257.08             87.33 
03/20/2008 01:00:00      359257.98      359343.92       359344.41             87.33

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If you look @ the definition for the Accumulator , it depends upon the current & the previous values. I am not sure why you are looking @ the next value.

-


I looked @ it closely and I think you got confused by the "Last Value" in the definition when actually it should've been the previous.

I hope this'll clear your doubts

Edited by: Udayan Upreti on May 5, 2008 10:49 AM

Former Member
0 Kudos

I understand the The Accumulator Def from Help is:

Accumulator Mode
The source column must be a numeric column.
The accumulator mode calculation is as follows:
If the current column value is less than the previous value, the accumulator value is set to

Scaling Factor *[Current Value + (Max Range -Last Value)].

If the current column is greater than the previous values, the accumulator value is set to
Scaling Factor * (Current Value - Last Value).

If you have increasing values and a scaling factor of one, you get a simple accumulator.

So therefore I would expect the a null number response in the first row since that row would not have a prior value. But the output I am receiving leads me to believe it's actually taking row 2 value - row 1 value since this falls into condition 2 of the above rule set. Therefore using this logic I would get a null number in the last row since I don't have a value for row last() + 1...

Hope that makes some sense....

Dennis

PS....

After a loosening of the brain freeze I was under I realized that from my original data set to my Totalized one, I was one record less. I see the totalizer removes that last record.. There is the Ah Haa moment.

It is still doing the row 2 value - row 1 value to gather the row 1 accumulator but my puzzle is solved..

Edited by: Dennis West on May 5, 2008 11:53 AM

Former Member
0 Kudos

And I thought you were worried about the last totalized row.

But your understanding is correct - you should get a 0 for the first row rather than a row2-row1.

If that is the case then you first and second row accumulator would show the same value , correct?

Anyways , let me ask you the version you are on?May be that would explain the behavior.

Former Member
0 Kudos

Working on Version 11.5...

Answers (0)