Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2012
    Posts
    16

    Need help doing a (hopefully) simple calculation using queries.

    I have 10 Tickers that I import from Excel onto Access. Each ticker has about 20-40 securities, each having a # of shares and a price. Shares*Price = Market Value. I was able to make a query (let's call this query B) where I summed the market value of each ticker and the totals seem to match the Excel data. This query only shows the 10 tickers and their aggregate market values. No problems there.

    My problem is calculating a cash component for each ticker. The cash component of each ticker can be found by doing NAV - Market Value (total for each ticker). The NAV is NOT part of the Excel file I used to import this data - instead - it's fixed into some larger table that houses over 450 tickers. These are test funds so these NAVs dont change.



    I made a new query called C which aims to extract NAV from the large table for each of the 10 tickers and then subtract the market value calculated in query B. Only problem is, instead of getting 10 records, I get nearly 5000! And the numbers really off anyway - not idea where/why it's getting the data for what it's getting.

    Any idea on how to proceed? In theory it seems simple, but I just can't wrap my head around. Hopefully my context was explained well enough.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    What is the SQL of your query? 10*450 is "nearly 5000", which means you may not have the correct join(s) between the tables, which will produce a Cartesian product.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 12
    Last Post: 04-03-2012, 06:31 AM
  2. Simple calculation box
    By jordz in forum Reports
    Replies: 1
    Last Post: 03-19-2012, 01:40 PM
  3. Simple field calculation
    By stryder09 in forum Access
    Replies: 4
    Last Post: 02-11-2011, 11:48 AM
  4. Simple forms/queries question (I hope!)
    By Remster in forum Access
    Replies: 6
    Last Post: 09-07-2010, 12:08 PM
  5. Replies: 5
    Last Post: 07-15-2010, 10:05 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