Link to home
Start Free TrialLog in
Avatar of Seamus2626
Seamus2626Flag for Ireland

asked on

Query a crosstab query

Hi,

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
Test.xlsx
Avatar of Randy Poole
Randy Poole
Flag of United States of America image

Also post the SQL for your cross tab returning YTD
Avatar of Seamus2626

ASKER

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

i.e May - Apr = May Actual
ASKER CERTIFIED SOLUTION
Avatar of Randy Poole
Randy Poole
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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