Skip to Content
0
Jul 02, 2020 at 06:35 PM

Crosstab calculated member insertion formula

69 Views

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!

Attachments

report.png (11.7 kB)