Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a big big question for an impromptu expert

Status
Not open for further replies.

martine

Technical User
Jan 15, 2001
32
CA
Hi,
I have a question in Impromptu ...

I must put a column calculation in my report
If Parent Job is missing and priority = 0 then 0 (fine)
else If Parent Job is not missing and priority <> 0 then
priority (fine) BUT
If Parent is not missing and priority = 0 I must put the priority of the Parent Job & Suffix

Job # Suf Priority Parent Job Parent Suffix
1- M241241 0,00 0,00 NULL 0,00
2- M241241 1.00 10642.00 M241241 0,00
3- M241241 2.00 0,00 M241241 1.00
4- M241241 3.00 206009.00 M241241 2.00
5- M241241 4.00 0,00 M241241 3.00
6- M241241 5.00 0,00 M241241 3.00
7- M241241 6.00 0,00 M241241 3.00
8- M241241 7.00 0,00 M241241 1.00
9- M241241 8.00 0,00 M241241 1.00

The result will be for my new colum:

1- 0.00
2- 10642.00
3- 10642.00
4- 206009.00
5- 206009.00
6- 206009.00
7- 206009.00
8- 10642.00
9- 10642.00

How can I do this? With Lookup function ?
Help me!!

Thank you
Regards
Martine
 
Martine,

Use If-Then-else combines with the is missing comparison. That should do the trick.

Regards,

Dave Griffin


The Decision Support Group
Reporting Consulting with Cognos BI Tools
&quot;Magic with Data&quot;
[pc2]
Want good answers? Read FAQ401-2487 first!
 
Martine

The only way i can see you doing this is to add the table that contains the Job, Suf and Priority fileds into your catalog again as an alias, Then Join to the original table

T1.Parent Job = Alias.Job
T2.Parent Suffix = Alias.Suf

You will then have the Alias.Priority value (Priority of Parent) available for each record.

Then create your formula :

If Parent Job is missing and priority = 0 then else
If Parent Job is not missing and priority <> 0 then
priority
else If Parent is not missing and priority = 0 then Parent Priority (Alias.Priority)

HTH

Gary Parker
Systems Support Analyst
Manchester, England
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top