6 Replies Latest reply: Sep 10, 2013 7:53 AM by Ekugbere Esemiteye

# How to compare year by year

Hi,

i have trying to compare two different years, i have a dimension called

DateArrived:

Source,

Registration,

[Model/Make],

CC,

date([Date Bike Arrived]) as [Date Arrived],

Date(MonthStart([Date Bike Arrived]),'MMM-YYYY') as [Arrived MonthYear],

year([Date Bike Arrived]) as [Arrived Year],

Month([Date Bike Arrived]) as [Arrived Month],

1 as ArrivedCount

FROM

Tier2_QVDs\DateArrived.qvd

(qvd);

my aim is to compare betweeen two months or year (arrive count), how many bikes came in ( i can do that in a single table)

but need to compare by year or month on a chat? and is it posible to add a second dimension like repair to it

• ###### Re: How to compare year by year

Try something like this..

Exoression1: SUM({<Year = {"\$(CurrentYear)"} >} BikeSales)

Expression 2: SUM({<Year = {"\$(PreviousYear)"} >} BikeSales)

Hope that helps.

Oh - and ofcourse you have to calculate the current year and previous year and store it in the variables and use them here..

• ###### Re: How to compare year by year

How do i do such, whatever i have achieved so far are called try n error and lot of help from this wonderful community, kindly help me out, do i just create the variable as date?

• ###### Re: How to compare year by year

It will be alot easier if you provide a sample dataset with the QVW..

i can understand better and will be able provide a solution if possible.

Thanks,