2 Replies Latest reply: May 26, 2015 1:28 PM by Smaranda Fetila RSS

    Chart Scripting? Help

    Smaranda Fetila

      These are my three tables:

       

      Transaction:

      LOAD locationid,

          trans_act,

          Hour,

          Soldon,

          Location

      FROM

      [C:\QVD\Transaction_add.qvd] (qvd);

       

      Transaction_detail:

      LOAD trans_act,

          eventid,

          itemid,

          Event,

          lastYearEventId,

      FROM

      [C:\QVD\Transaction_detail_add.qvd] (qvd);

       

      MasterCalendar:

      LOAD TempDate as Soldon,

          Week(TempDate) as Week,

          Year(TempDate) as Year,

          Month(TempDate) as Month,

          Day(TempDate) as Day,

          Weekday(TempDate) as WeekDay

      Resident TempCal

      Order by TempDate ASC;

       

      I want to create a chart that will reflect an hourly count of items sold in a particular WeekDay, for an Event and compare it, in the same chart, to an hourly count of items sold on the same WeekDay (that will be a different date), for the lastYearEventId.

      I had it working without comparing it:

      • dimension: Hour
      • expression: count(itemid)

       

      How should I approach the camparison to lastYearEventId?