Calculating Year on Year Variance

Tomreis

New Member
Joined
Apr 21, 2016
Messages
5
Hi guys,

This is my first post and contribution to the Forum so please forgive any lack of, incorrect info (if any).

I've just picked up Access again after 2 years off touching it so I'm VERY rusty.

I have a data set spanning 5 years and need to run some variances to see how we are performing. Below is a snippet. I'm trying to figure out how to run a query that will lookup a reference from one field (Tag LY), find it in another (TAG TY) then perform a calculation from another field between those lookups (Revenue from lookup 1 minus Revenue from lookup 2).


Tag TYTag LYDateSourceSub SourceRm NightsRevenueADRExpr1
Jan-15CROGeneral ReservationsJan-14CROGeneral Reservations01/01/2015CROGeneral Reservations138£5,122.00£37.12CRO01/01/2015
Jan-15GDSGalileoJan-14GDSGalileo01/01/2015GDSGalileo128£7,457.00£58.26GDS01/01/2015
Jan-15GDSSabreJan-14GDSSabre01/01/2015GDSSabre86£4,439.00£51.62GDS01/01/2015
Jan-15GDSWorldspanJan-14GDSWorldspan01/01/2015GDSWorldspan133£7,784.00£58.53GDS01/01/2015
Jan-15GDSAmadeusJan-14GDSAmadeus01/01/2015GDSAmadeus113£5,593.00£49.50GDS01/01/2015
Jan-15GDSAgencies Via PegasusJan-14GDSAgencies Via Pegasus01/01/2015GDSAgencies Via Pegasus144£4,877.00£33.87GDS01/01/2015
Jan-15WEBIndependentJan-14WEBIndependent01/01/2015WEBIndependent96£4,517.00£47.05WEB01/01/2015
Jan-15WEBBrandJan-14WEBBrand01/01/2015WEBBrand102£7,543.00£73.95WEB01/01/2015

<tbody>
</tbody>


I'm on Access 2016, but please let me know if you have any questions.

Really appreciate the help

Kind regards

Tom
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If you're in the same table just create another calculated field with the expression. If you're looking up from a different table, then inner join which is most easily added via design view.
 
Upvote 0
apologies just this one, the tag fields are unique references for a point in time. TY represents the date stamp of the line and LY being the relative code as if it were last year.
 
Upvote 0
Ok you already have an Expr1 I see, you can, in design view, copy and paste that into another column and change the field names/operators to suit, or start from scratch by right clicking, build, then enter the formula.


edit: Oh wait, if the numbers appear in different rows and you wish to match them by a common label before subtracting, then you have to join the table to itself. In design view, under Table you add the same table to the query, then drag the common field from the second to the first.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top