on 04-11-2016 2:12 PM
Hi guys, i need some help in Crystal for creating an average of a calculated column in a crosstab.
For better understanding alle the rows are visible, in the columns you can see 2 fields, the coloured one is the value of the db the other one is the
calculated value, in this case if there is a 11 the value should be 0
Formular for the rows:
if GridValueAt(CurrentRowIndex, CurrentColumnIndex, CurrentSummaryIndex-1) = 11 then
0
else
(GridValueAt(CurrentRowIndex, CurrentColumnIndex, CurrentSummaryIndex-1))
Now i want to summarize this columns to have the sum of all.
Field: Average_Right
local numbervar i;
local numbervar total;
local numbervar avg;
while i <> currentrowindex do
(
total := total + tonumber(gridvalueat(i,CurrentColumnIndex,CurrentSummaryIndex));
i := i + 1;
);
total;
What i need is a average of this total and therefore i need a count of the values which are not like 11.
In the Field "Gesamtdurchschnitt" you can see the average result of CR, what is not correct cause it includes the rows which are 11.
How to include this case into the summarize formular?
Thanks for any hint and help
THX and BR
Rudi
Hi Rudi,
Could you try:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rudi,
Could you try:
-Abhilash
Oh, I didn't realize totals also have to skip the 11s.
Try:
-Abhilash
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.