Friday, February 25, 2011

How to count only certain data in Cognos Report Studio?

Sometimes a count needs to be made on data that needs to meet certain requirements.
There are several ways to accomplish this. Here are two examples.


Example 1:

COUNT ( IF ( [FrameworkField] <= 2700 ) THEN (1) ELSE (0) )



Example 2:

CASE WHEN ( [FrameworkField] <= 2700 ) THEN (1) ELSE (0) END


Put either of these in a 'data-item'.
You can now use it in a list and do a Total on it.

No comments:

Post a Comment