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

Calculation Expression--HELP!

Started by ADW, 23 Oct 2007 05:08:26 PM

Previous topic - Next topic

ADW

I have been trying to figure this out for weeks with no luck. Unfortuantely, due to my mind thinking in Excel term versus Cognos 8 ReportNet terms, I need assistance figuring out how to create and represent an expression in a Report I'm creating. I have a column from a DB I'm mapping to that has integer data representing a duration of time. What the end user wants is a conditional expression that does the following

IF [package].
.[data-item]>=7

   THEN (Count([package].
.[data-item])/(Count(Rows))

Seems simple enough, but:

  1) How or Where would I place that expression in a cell/column/page by itself
  2) I keep getting parsing errors when I try to do a count of [package].
.[data-item]>=7
  2) I can't get the expression to validate nor can I get half of the condition to validate and keep getting parsing errors.

Thanks in advance!

rockytopmark

Keep it simple...  Set the value to 1 if it meets the criteria or 0 if not.

Then simply let the aggregation handle the math.

Create a Query Item, "7 or better":
IF ([package]..[data-item]>=7) THEN (1) ELSE (0)

Then to get your ratio, divide the count of the rows by this query item.

This of course will not make much sense in a detail report, but in a summarized report (where there is some level of grouping and therefore, some aggregation) it will get you your result.

ADW

Thanks, I will give that a try.