on ‎2013 Dec 07 8:59 PM
Request clarification before answering.
Hi Simona,
Do you simply need an Average Column towards the end just like the above screenshot?
If yes, and if you're using CR 2008 or higher then the steps below should work:
1) While in the Preview Mode, right-click the last date and select Calculated Member > Insert Column.
You should see a blank column with zero values inserted
2) Right-click one of the zero values in the column and select Calculated Member > Edit Calculation Formula and use this code:
local numbervar i;
local numbervar avg;
local numbervar cnt;
for i := 1 to CurrentColumnIndex-1 do
(
avg := avg + GridValueAt(CurrentRowIndex, i, CurrentSummaryIndex);
cnt := cnt + 1;
);
avg/cnt;
3) Then, right-click the blank header cell for this column and select Calculated Member > Edit Header formula and write this:
"Average"
That's it!
Let me know how this goes.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Abhilash,
I need your help again. The Average column is inserted ok but as I am using date range selection parameters (start and end date), the column is being inserted after the date when I last added a calculated member, it doesnt insert after the last column as selected by ?enddate parameter.
sorry I stated it doesn't matter where this column goes , but I realized it needs to stay always at the end or at the front.
I guess I need to modify Insertion formula? or what do you suggest?
this is current insertion formula:
GetColumnGroupIndexOf(CurrentColumnIndex) = 1 and GridRowColumnValue("@date") = CDateTime (2013, 12, 09, 12, 28, 48)
I was reading your previous answers to others , I tried Maximum, or to use my "?enddate" parameter entry, but it doesnt work or I don't use it correctly so I gave up searching and trying. I also tried your suggestion to put totals at the right, and then insert a child column. But after I click insert a child column, no empty column is inserted although I can see the entry is inserted in Advanced Calculations.
I am new to using calculated members so need your help .
Simona
| User | Count |
|---|---|
| 14 | |
| 9 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.