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

Calculations in Report Studio

Status
Not open for further replies.

atomictortoise

Programmer
Aug 9, 2001
9
GB
Hi All,

Can anyone tell me how to solve this problem. I have 3 queries in my report which provide summary values for 'Sales' 'Purchases and 'Labour' I need to calculate a margin value which is 'Sales' - ('Purchase' + 'Labour') however for certain types of sale there may be no purchases and in some circumstances purchases but no Labour records in the database. When this occurs my calculation returns no value for margin.

Regards
 
Using coalesce may fix this technically, but would it be usefull to calculate a margin for ,say a sales figure with no purchase equivalent?
Depending on your joins, the coalesce may help with calculating the results for types with 1 or more components missing..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top