Skip to Content
0

Refer to Cross tab column header values

Feb 23, 2017 at 11:44 AM

34

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Abhilash Kumar
Feb 24, 2017 at 10:20 AM
1

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

Share
10 |10000 characters needed characters left characters exceeded
Abhilash Kumar
Feb 23, 2017 at 01:47 PM
0

Hi Mustafa,

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

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Mustafa AlJailani Feb 23, 2017 at 02:25 PM
0

please download it from

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

thank you very much for support

Share
10 |10000 characters needed characters left characters exceeded
Mustafa AlJailani Feb 24, 2017 at 01:17 PM
0

thank you very much Abhilash for regular support :)

Share
10 |10000 characters needed characters left characters exceeded