cancel
Showing results for 
Search instead for 
Did you mean: 

Crosstab calculated member insertion formula

cwarner
Participant
0 Kudos
257

I have a crosstab that does weekly averages, ranges, maximums, minimums and totals using "calculated members".

Example: I compute maximum with this formula: local numbervar i; local numbervar max := GridValueAt(CurrentRowIndex,0,0); for i := 1 to CurrentColumnIndex-1 do ( if GridValueAt(CurrentRowIndex,i,CurrentSummaryIndex) > max then ( max := GridValueAt(CurrentRowIndex,i,CurrentSummaryIndex); ) ); max;

I also have the crosstab inserted into the Group header, so it will automatically separate the crosstabs by month.

I would like to tweak the calculated members, perhaps with an insertion formula, so I don't have to manually insert new calculated members for future months (example: May), but maintain the current format of the report exactly as it is.

My current insertion formula looks like this: GetColumnGroupIndexOf(CurrentColumnIndex) = 1 and GridRowColumnValue("vwGenVouchInfo.Voucher_Service_Date") = CDateTime (2020, 02, 24, 00, 00, 00)

Here is my report:

Any suggestions?

Thanks!

View Entire Topic
abhilash_kumar
Active Contributor
0 Kudos

Hi Cheryl,

Just use:

GetColumnGroupIndexOf(CurrentColumnIndex) = 1

-Abhilash

cwarner
Participant
0 Kudos

Thanks, but when I made that change, it changed the format of my report and places the average after each week instead of calculating the average of all 5 weeks, as in my initial report.

I still need to show the weekly totals, but the average needs to be of all 5 weeks together.

NOT like this:

It should look like this: