COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: CJB on 24 Sep 2014 09:55:07 AM

Title: Calculate Percentages on Crosstab Queries
Post by: CJB on 24 Sep 2014 09:55:07 AM
Hello.

I've got a crosstab report with rows based on a Product ID, columns based on the Gender of the customer, and the crosstab intersections is the number of members who bought the product for that gender. I'm trying to create a query calculation for the row that give me just the % of products sold to Female customers ('F') for that product row.

I'm looking for output to be the Product, # products sold to men, # products sold to women, total products sold, percentage sold to women for each line of the crosstab.

I've tried count([Member Count] for {[Product Id (PDPD ID)],[Member Gender]='F'}) / count ([Member Count] for [Product ID (PDPD ID)]).

I've tried if/then conditional calculations.

My validations always come back as ok, but the results in the report always comes back as the report total (grand total of all products sold).

Any ideas or pointing me in a general direction would be most appreciated! Thanks much!

Title: Re: Calculate Percentages on Crosstab Queries
Post by: Francis aka khayman on 25 Sep 2014 03:03:27 AM
are you using dimensional or relational?