I have a requirement that stomped me. Maybe a fresh perspective will solve the question. On a daily basis we take counts on tables and append them on to a flat table that consist of Date and count. Sometimes the count spikes above the average and in effect we can determine if there was a bad incoming file due to count increase. However I would like to correct this spikes within the report as follows:
Date Count
3/1/02 10
3/2/02 11
3/3/02 12
3/4/02 13
3/5/02 14
3/6/02 15
3/7/02 16
3/8/02 2
3/9/02 18
3/10/02 19
3/11/02 20
3/12/02 200
3/13/02 210
3/14/02 22
3/15/02 22
3/16/02 23
3/17/02 240
3/18/02 25
3/19/02 26
Would like to have a smooth line out of the cube in the fixed column
Date Count Fixed
3/1/02 10 10
3/2/02 11 11
3/3/02 12 12
3/4/02 13 13 <-- Formula
3/5/02 14 14
3/6/02 15 15
3/7/02 16 16
3/8/02 2 16
3/9/02 18 18
3/10/02 19 19
3/11/02 20 20
3/12/02 200 20
3/13/02 210 20
3/14/02 22 22
3/15/02 22 22
3/16/02 23 23
3/17/02 240 23
3/18/02 25 25
3/19/02 26 26
In Excel I can use the following formula
to smooth the line:
=IF(ABS(AVERAGE($C2:$C4)-$B5)<$D$1*C4,$B5,C4)
This formula works in excel assuming that the header fields are in the first row in the sheet and Date = Column A, Count = Column B, fixed = Column C.
The logic is taking the average of the last three counts minus the current count and having a tolerance level defined by the last value and determining if we need to use the previous of the fixed or the count value in order to smooth the line.
In Business Objects, I use the predefined formulas provided such as "Previous(), Average(), Abs(), ..." However I can not use the previous of the same function because Business Objects will not allow "Looping".
In a sense this is a recursive function that works great in excel, however when attempting to do so in BO, then I did not find a way to do recursiveness.
If anyone has done something similar in a report or has a better idea to smooth the line, then please reply so that I can close the issue and see if BO can accomplish this without the use of "Application Foundation".
Date Count
3/1/02 10
3/2/02 11
3/3/02 12
3/4/02 13
3/5/02 14
3/6/02 15
3/7/02 16
3/8/02 2
3/9/02 18
3/10/02 19
3/11/02 20
3/12/02 200
3/13/02 210
3/14/02 22
3/15/02 22
3/16/02 23
3/17/02 240
3/18/02 25
3/19/02 26
Would like to have a smooth line out of the cube in the fixed column
Date Count Fixed
3/1/02 10 10
3/2/02 11 11
3/3/02 12 12
3/4/02 13 13 <-- Formula
3/5/02 14 14
3/6/02 15 15
3/7/02 16 16
3/8/02 2 16
3/9/02 18 18
3/10/02 19 19
3/11/02 20 20
3/12/02 200 20
3/13/02 210 20
3/14/02 22 22
3/15/02 22 22
3/16/02 23 23
3/17/02 240 23
3/18/02 25 25
3/19/02 26 26
In Excel I can use the following formula
to smooth the line:
=IF(ABS(AVERAGE($C2:$C4)-$B5)<$D$1*C4,$B5,C4)
This formula works in excel assuming that the header fields are in the first row in the sheet and Date = Column A, Count = Column B, fixed = Column C.
The logic is taking the average of the last three counts minus the current count and having a tolerance level defined by the last value and determining if we need to use the previous of the fixed or the count value in order to smooth the line.
In Business Objects, I use the predefined formulas provided such as "Previous(), Average(), Abs(), ..." However I can not use the previous of the same function because Business Objects will not allow "Looping".
In a sense this is a recursive function that works great in excel, however when attempting to do so in BO, then I did not find a way to do recursiveness.
If anyone has done something similar in a report or has a better idea to smooth the line, then please reply so that I can close the issue and see if BO can accomplish this without the use of "Application Foundation".