Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8810635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:10:00+00:00 2026-06-14T03:10:00+00:00

Two of the columns in Query A are labeled 2012 and 2011. However, next

  • 0

Two of the columns in Query A are labeled 2012 and 2011.

However, next year, the columns will be 2013 and 2012. This is because those columns are part of a crosstab where the name is done via the year() function.

Anyway, I am using a new query to add a column that subtracts the values in the two year columns, but I don’t know how to refer to those columns dynamically.

e.g. I could easily add a column

Difference: [2012 Revenue] - [2011 Revenue]

But this would stop working next year.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:10:02+00:00Added an answer on June 14, 2026 at 3:10 am

    Building on HelloW excellent suggestion, you could use as the Column Header of your Crosstab an expression like "RevYr" & (Year(Date())-Year(RevenueDate), which would evaluate to
    RevYr0, RevYr1, RevYr2, etc…
    Your difference would then become

    Difference: RevYr0 - RevYr1
    

    Edit:
    Facing a similar problem using a crosstab, I found these 2 very interesting links:
    http://allenbrowne.com/ser-67.html
    http://www.access.hookom.net/DynamicMthlyCrosstabRpt.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this join query, i am multiplying two columns from different tables, premium &
I'm trying to construct a query that will map two columns, one, a date
Here is original Query :, it generates o/p with two columns name (label, count)
I have the query to select some columns from two tables, which must contain
I have table with two columns (varchar from, varchar to). This table represents connections
I have two columns as company and product. I use the following query to
I have a table with two columns - artist, release_id What query can I
I'm doing a simple query on the database, a search on two columns. I
I'm trying to run a query where two columns are not the same, but
since you can't auto increment two columns what would the Query be to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.