A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Sum [Price] IIF [BelowSetFloor] 0



 
 
Thread Tools Display Modes
  #1  
Old March 26th, 2010, 04:04 AM posted to microsoft.public.access.reports
rcs
external usenet poster
 
Posts: 13
Default Sum [Price] IIF [BelowSetFloor] 0


How do I write the calculation?

for this consignor group I have to list each element of the consignor
settlement as a separate item - provide a step by step calculation for each
variable (they want to audit each calc)

So I first have gross sales= Sum([Price])+Sum([Adjust Sale Price])

next calc I need to do is to take result of this field and subtract prices
for lots that no saled because the purchase price was below the established
minimum floor. These lots can be identified by a currency field
[BelowSetFloor] which is either = 0 (lots sold = minimum purchase price) or
= 100 (lots sold minimum purchase price)

Want to create a calculated field that will total only the sale prices where
the record also has BelowSetFloor = 100

So if consignor had 5 lots

1 - Price = 1500, BellowSetFloor = 0
2 - Price = 1100, BellowSetFloor = 0
3 - Price = 1100, BellowSetFloor = 100
4 - Price = 1100, BellowSetFloor = 100
5 - Price = 1500, BellowSetFloor = 0

the new calculated field would = 200

This calculated field will then be subtracted from the gross sale field
identified above

  #2  
Old March 26th, 2010, 04:25 AM posted to microsoft.public.access.reports
rcs
external usenet poster
 
Posts: 13
Default Sum [Price] IIF [BelowSetFloor] 0

figured it out -

=Sum(IIf([BelowSetFloor]0,[Price],0))

"rcs" wrote:


How do I write the calculation?

for this consignor group I have to list each element of the consignor
settlement as a separate item - provide a step by step calculation for each
variable (they want to audit each calc)

So I first have gross sales= Sum([Price])+Sum([Adjust Sale Price])

next calc I need to do is to take result of this field and subtract prices
for lots that no saled because the purchase price was below the established
minimum floor. These lots can be identified by a currency field
[BelowSetFloor] which is either = 0 (lots sold = minimum purchase price) or
= 100 (lots sold minimum purchase price)

Want to create a calculated field that will total only the sale prices where
the record also has BelowSetFloor = 100

So if consignor had 5 lots

1 - Price = 1500, BellowSetFloor = 0
2 - Price = 1100, BellowSetFloor = 0
3 - Price = 1100, BellowSetFloor = 100
4 - Price = 1100, BellowSetFloor = 100
5 - Price = 1500, BellowSetFloor = 0

the new calculated field would = 200

This calculated field will then be subtracted from the gross sale field
identified above

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.