Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to compare year by year

Hi,

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

DateArrived:

LOAD  [BLD Ref],

     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

6 Replies
Anonymous
Not applicable
Author

Try something like this..

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

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

Hope that helps.

-Aadil

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

Not applicable
Author

Thanks Aadil,

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?

Anonymous
Not applicable
Author

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,

Aadil

Not applicable
Author

can  you send me your email id, so i can send to you.though am using personal edition

Anonymous
Not applicable
Author

Not applicable
Author

Thanks i have attached and sent to your email