If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Count no. of records advice.

Started by kc9400, 04 Feb 2014 07:58:49 AM

Previous topic - Next topic

kc9400

Good afternoon,

run into a bit of a problem. Here is what I've tried so far:

CASE WHEN  [SQL data].[Score] >80 THEN count([SQL data].[APPRO])END)


I can't seem to find any solutions to what I'm trying to achieve. What I need to do is return the number of records displayed which have a Score of >80

When life gives you lemons, throw them at someone.

BigChris

How about something along the lines of:

sum(CASE WHEN [SQL data].[Score]>80 THEN 1 ELSE 0 END)

kc9400

I gave that a try but then I'm running into:

Column 'SQL_data.APPRO_NO' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.


What kind of information would be useful for you to be able to best advice me as to how to resolve the problem?
When life gives you lemons, throw them at someone.

Ammus1234

Try this.
Use the below dataitem.
CASE WHEN [SQL data].[Score]>80 THEN 1 ELSE 0 END

Change the aggregate function of the dataitem to 'Total'

kc9400

Cheers for your help. I ended up just modifying the SQL and bringing in an extra data item  :)

When life gives you lemons, throw them at someone.