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

Help with Maximum Function

Started by fatnos, 08 Oct 2007 02:09:49 PM

Previous topic - Next topic

fatnos

Hi-

I have a report that lists the 4 quarters of the year.  Each quarter is its own data item in the query.  I want to insert a data item in my crosstab that will give me the maximum for that row.  Example:




Q1Q2Q3Q4MAX
Row11020304040
Row21250403050

Any help is greatly appreciated.  Thanks to all....

Chris

DSR

Try by using IF condition

The below code is need to take in one calculated dataitem

i.e
if (q1>q2) and (q1>q3) and q1>q4
then q1
else if q2>q1 and q2>q3 and q2>q4
then q2

else if q3>q1 and q3>q2 and q3>q4

then q3

else q4

here q1--> 1st dataitem
     q2--> 2nd data item
    ...........

I think this can help for ur question
if not just post it again.

Thanks
Sanjeev