Query a crosstab query

Posted on 2014-07-14
Last Modified: 2014-07-17

I have a cross tab query that returns me sales peoples sales on YTD basis.

So i have sales x, sales April, Sales May

Unfortunately as the data is YTD, the only way we can view month by month basis is to subtract May from April, and the uplift in sales is Mays figures

So can i create a query that looks at columns May and April and returns all sales people with the uplift data i.e May minus April

In the attached spreadsheet i added a column to show the expected result

Many thanks
Question by:Seamus2626
    LVL 21

    Expert Comment

    by:Randy Poole
    Also post the SQL for your cross tab returning YTD

    Author Comment

    The YTD data is bought in via excel, into a linked table. So im thinking calc fields?

    i.e May - Apr = May Actual
    LVL 21

    Accepted Solution

    You have a linked table, but you have to have a SQL query to run against that table.  I need to know the syntax of this query.

    Author Comment

    So, i run a simple append query to create static tables, the append query builds up month on month data

    Now i am trying to seperate that data into a month by month view, i cant just flag it by date as the data is received YTD, so i must subtract this months YTD from last months YTD

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
    I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now