on 08-19-2014 2:43 PM
Hi All,
I need your help to resolve the below error will using previous function in group level.
Value | log | Difference using Previous |
A1 | B1 | |
A2 | B2 | B1-B2 |
A3 | B3 | B2-B3 |
A4 | B4 | B3-B4 |
A5 | B5 | B4-B5 |
A6 | B6 | B5-B6 |
A7 | B7 | B6-B7 |
A8 | B8 | B7-B8 |
need to find stddev |
In the above table those are in black has been done and the red one need to be done.
This table is based on group level while I'm using the stddev for the Difference using Previous column I'm getting an error THIS FIELD CANNOT BE SUMMARIZED.
Could you please help me out that whether is there any way to find difference without using previous or next function.
Hi Ramesh,
The stddev() function also accepts an array of numbers.
Try this:
1) Create a formula with this code and place it on the section beside the 'Difference using previous' column:
WhilePrintingRecords;
NumberVar array arr;
numbervar i;
i := i + 1;
redim preserve arr[i];
arr[i] := previous({Log}) - {Log};
"";
2) Create another formula and place this on the Footer:
WhilePrintingRecords;
NumberVar array arr;
Stddev(arr);
3) If you need to reset the array for each group, just create a reset formula with this code and place it on the Group Header:
WhilePrintingRecords;
NumberVar array arr := 0;
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Thank you!
Done the same and confussed to see that the reset formula specifed below is not reseting the values in group level.
To confirm that I tried to print the "i" values used in Difference formula the value of the "i" is continuing even after the group changed.
WhilePrintingRecords;
NumberVar array arr := 0;
Please help me out in this.
Regards,
Ramesh Jothimani
What do you mean by group level?
The formula evaluates on the details section and hence looks at 'difference' at each row. The Stddev is printed at the Group level by taking into account all differences for that group.
Could you post a screenshot of what you're trying to do and how the report is structured?
-Abhilash
Ok, see if this helps:
Modify the first formula above to:
WhilePrintingRecords;
Numbervar x := x + 1;
NumberVar array arr;
numbervar i;
If x <> 1 then
(
i := i + 1;
redim preserve arr[i];
arr[i] := previous({Log}) - {Log};
"";
);
Modify the reset formula on the Group Header to:
WhilePrintingRecords;
NumberVar array arr := 0;
Numbervar x := 0;
Numbervar i := 0;
-Abhilash
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.