Results 1 to 2 of 2
  1. #1
    Minimalist is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jul 2012
    Posts
    2

    Crosstab => Multiple Sets of Values


    I have the following crosstab which works well.

    Code:
    TRANSFORM Sum(qun_Sales_Total.InvItems) AS Inv_Total
    SELECT qun_Sales_Total.SalespNo AS [Agency No], qun_SalesPerson.SalesPersonName AS Agency, Sum(qun_Sales_Total.InvItems) AS [Total This Agency]
    FROM qun_Sales_Total INNER JOIN qun_SalesPerson ON qun_Sales_Total.SalespNo = qun_SalesPerson.SpNo
    GROUP BY qun_Sales_Total.SalespNo, qun_SalesPerson.SalesPersonName
    ORDER BY qun_Sales_Total.SalespNo
    PIVOT Year(InvoiceDate);
    However, I would like to add columns showing the sales delta in percent from year to year as a column. The final result should look something like this:

    Sales 2008 2008-2007 Sales 2009 2009-2008

    $5 100% 10 100%

    I have found this example (at the bottom of the page) but can't get it to work. Any help will be appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Show your attempted query. Provide sample of source data.
    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: 15
    Last Post: 10-22-2012, 06:06 PM
  2. Multiple Sets of the Same Data on 1 Report
    By rmikulas in forum Reports
    Replies: 1
    Last Post: 08-07-2012, 10:09 AM
  3. Displaying multiple text values in crosstab query
    By MFlood7356 in forum Queries
    Replies: 6
    Last Post: 06-28-2011, 11:30 AM
  4. Entry of Large Data Sets into multiple tables
    By bcouzens in forum Access
    Replies: 8
    Last Post: 05-26-2011, 02:22 PM
  5. Update Query - Multiple SETS and WHERE conditions
    By jasonbarnes in forum Queries
    Replies: 26
    Last Post: 12-15-2010, 01:08 PM

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