Skip to Content
avatar image
Former Member

Refer to Cross tab column header values

Hi,

I have cross tab with Multi columns and one calculated member , i want if the cell > 0 the formula should sum values from the columns (Header)

for example , the first row in the calculated member should give me 10 + 20 = 30% , the second column should be 80 and so on.

this is the formula i used to calculated the cells more than 0 , but i don't know how to include the column header value.

local numbervar i;
local numbervar count_nums; 
for i := 8 to CurrentColumnIndex-1 step 5  do
(    
     if GridValueAt(CurrentRowIndex,i,CurrentSummaryIndex)>0  then    
      (    
         count_nums := count_nums+1;    
      )    
);    
count_nums;

thank you very much.

capture.jpg (51.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 24, 2017 at 10:20 AM

    Hi Mustafa,

    Modify the selection formula to:

    local numbervar i;
    local numbervar count_nums; 
    for i := 8 to CurrentColumnIndex-1 step 5  do
    (    
         if GridValueAt(CurrentRowIndex,i,CurrentSummaryIndex)>0  then    
          (    
             count_nums := count_nums + (gridlabelat("@MADQty", i));    
          )    
    );    
    count_nums;

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 23, 2017 at 01:47 PM

    Hi Mustafa,

    Please attach the report with saved data. It is easier to write a formula on the actual report.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 23, 2017 at 02:25 PM

    please download it from

    https://drive.google.com/open?id=0B1oQ0Dd7y3TcbGgtMWcydzRQWVk

    thank you very much for support

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 24, 2017 at 01:17 PM

    thank you very much Abhilash for regular support :)

    Add comment
    10|10000 characters needed characters exceeded