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

Counting

Started by TCM, 09 Mar 2007 09:51:17 AM

Previous topic - Next topic

TCM

I am new to ReportNet and would like to do a seemingly easy task, count how many wigits were tested for any given year. The report contains the area the wigits are located, the year the wigit was installed, and a calculated field to count the number of wigits tested for each install year. It is grouped by area and then year installed. I used the following filter.

count(IF ( [YearInstalled]>0)
THEN
Ã,  Ã,  ([WIGITS])
ELSE (null) for [YearInstalled])


I believe this is close, but I am getting incorrect numbers, for example, I know that I have 1 wigit that was installed in 1980. It was tested in 2006 but using the filter above I get a count of 2 instead of 1. Anybody see what I'm doing wrong here?


Gloves

Try using a CASE statement.  Looks like this:

CASE

WHEN [Year] = 2006 THEN count([widgets]) ELSE 0

END

You can change this to look many different ways and do many different things.  This became a very powerful tool for me.  Write the case statement in a blank data item at the query level.