Results 1 to 4 of 4
  1. #1
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245

    Calculating return, via Parameter

    Hey,



    I have my query set up, and the return calc is running smoothly, however I want the first value to come back as 0, since you cannot have a return on a 0 Value....

    Now, Here is my Set Up:

    ClientID....ProductID....InvestmentID...MonthlyDat e..Start...Cash...end....Expr...Return....(Where expr equals REturn calc...)

    Now I want to set up an if statment saying IIF( MonthlyDate=Min(MonthlyDate) Where InvestmentID=InvestmentID And ClientID=ClientID And ProdcutID=ProductID,"0",expr)

    Thanks,

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    Don't understand the criteria in that condition.

    What field is used to calculate return - Cash? What is the Return calc result if Cash is 0? Why would the calc not be 0?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    mike02 is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Posts
    245
    The return is the (End/Starting Asset) -1

    The starting asset is the previous End, but if the End is Null, Meaning first month, then it is the initial transfer.

    So it will never be zero....

    Now If i can put a where condition on it, then i will be able to get around this issue, If it is the Min(MonthlyDate), which is the first Month the client started

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,598
    Post query for analysis and sample of data might be helpful. If you want to provide db, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-28-2013, 01:20 PM
  2. calculating
    By cade1980 in forum Access
    Replies: 3
    Last Post: 04-17-2012, 10:42 PM
  3. Replies: 3
    Last Post: 03-20-2012, 10:31 AM
  4. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  5. Replies: 3
    Last Post: 08-15-2011, 10:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums