COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cognos_guru on 07 Apr 2009 11:14:01 AM

Title: Using {at X=1} in the Expression Editor
Post by: cognos_guru on 07 Apr 2009 11:14:01 AM
I'm trying to create a crosstab that will let me have a calculated query subject based off a filter on one of the other query subjects, but I cannot get it to work.

Crosstab Example:
Across the Top - Date sold, Shoe Color
Down the side - Vendor
Measure - Count

I want to show a calculation at the same level as the shoe color dimension (under the date sold dimension) that is percentage of red shoes to total shoes.  I can do the total shoe calculation (ttl column for future ref), but I can't get the red shoes (red being a value in the data)  isolated without filtering the entire crosstab; thus eliminating the total shoe count. 

I tried using the total(count {at shoe = 'red'})/total(total column)  in the expression editor, but nothing returns.

Any help is appreciated!