COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: FirstStruck on 27 Feb 2012 12:22:25 PM

Title: SOLVED: Using conditional statements
Post by: FirstStruck on 27 Feb 2012 12:22:25 PM
Hello,

I am trying to write a report that will display when an employee is given a pay raise.
I have 4 Fields: Name, Pay Date, Job, Pay Rate

There are 10 possible Jobs 1 employee could perform during 1 Pay Date. Each of those 10 jobs could possibly be at a different Pay Rate.

Here is an example of 1 employee's output:

Name                 Pay Date                Job                 Pay Rate
John Doe            1/1/12                     Server            $4
John Doe            1/1/12                     Host               $5
John Doe            1/1/12                     Cook              $10
John Doe            1/8/12                     Server            $4
John Doe            1/8/12                     Host               $5
John Doe            1/8/12                     Cook              $11

Notice how the Pay Rate changed for Cook from $10 to $11. How can I use conditional statements to say display the raise in Cook from $10 to $11, but don't display the Server & Host because they didn't change - And don't display folks who didn't get a raise?

Thanks for your help or suggestions!!
Title: Re: Using conditional statements
Post by: navissar on 27 Feb 2012 12:32:01 PM
I'd try something along the lines of a filter on maximum([pay rate] for [job],[name])<>minimum([pay rate] for [job],[name]).
Title: Re: Using conditional statements
Post by: FirstStruck on 27 Feb 2012 12:42:55 PM
Quote from: Nimrod Avissar on 27 Feb 2012 12:32:01 PM
I'd try something along the lines of a filter on maximum([pay rate] for [job],[name])<>minimum([pay rate] for [job],[name]).

This worked perfectly. Thanks so much!