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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If-Then-Else Statement

Status
Not open for further replies.

RedSoxRule

Technical User
Aug 9, 2010
2
0
0
US
I need to combine these two if-then-else statements but I'm having trouble with the syntax in Cognos. I know how to do it in Access.

If([qry_Facility_Reimbursement_Info].[Direct Pay Site?]='yes') THEN (([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Amount])-([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Amount]*[qry_Facility_Reimbursement_Info].[Proration %])) Else null

If([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Type]='DP') THEN (([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Amount])-([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Amount]*[qry_Facility_Reimbursement_Info].[Proration %])) Else null
 
Never mind, I figured it out.

IF(([qry_Facility_Reimbursement_Info].[Direct Pay Site?]='yes') AND ([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Type]='dp'))THEN (([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Amount])-([qry_Financial_Invoices].[Supplier Inv Upload) Invoice Amount]*[qry_Facility_Reimbursement_Info].[Proration %])) Else null
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top