N®**-* Number of Rows *N© – *Number of Columns
In the Grid Layout of the Cross Tab, the Row Index starts from 0 and increments by 1 for each subsequent Row. Similarly the Column Index starts from 0 and increments by 1 for each subsequent Column. The Summary index is 0 for the first Summarized field, 1 for the next and so on. In order to handle the task of Conditional Summarization towards granting the solution the current challenge we have to utilize the Grid Concept within the Advanced Calculations of the Cross Tab.
So let us insert an Embedded Summary in the Cross Tab by performing the following action: Cross Tab (Right Click)->Advanced Calculations->Embedded Summary. In the ‘Embedded Summaries’ window, we can Add (New), Remove and Edit the Embedded Summary.When we add or insert an Embedded Summary, we can make use of these three Indices so as to help us to refer a particular cell. The interesting point here is the Summarized field shares the same Row Index and Column Index and hence, as it may seem apparently, it is the Summary Index which differs.
So considering the First cell of the above Illustration, the comparative indices are presented below:
*where-* *(RI) – Row Index* *(CI) – Column Index* *(SI) – Summary Index* Thus, it becomes clear from the above illustration that only the Summary Index varies for the Embedded Summary when compared with the Summarized Field. Again, interestingly it shares the same Column Label of the Summarized field which justifies the name it holds. We can effectively use the Embedded Summary to skillfully devise formula using the following *function*:Let us utilize this Function within the Calculation (+formula+) of the Embedded Summary as under: If ((CurrentColumnIndex+1) Mod 3 = 0 ) then (IIF ((GridValueAt ( GetNumRows-1 , CurrentColumnIndex , CurrentSummaryIndex-1 ))<>0,100 * (GridValueAt ( CurrentRowIndex , CurrentColumnIndex , CurrentSummaryIndex-1 )/GridValueAt ( GetNumRows-1 , CurrentColumnIndex , CurrentSummaryIndex-1 )),0 )) Else (GridValueAt (CurrentRowIndex , CurrentColumnIndex , CurrentSummaryIndex-1)) After we have included the Embedded Summary in the Cross Tab, we no longer need the Summarized field. So, we suppress this field by performing the following action: Summarized field (Right Click)->Format Field->Common Tab->Suppress (Check the option).