0 Replies Latest reply: Jul 22, 2013 4:41 PM by pruittlr RSS

    Compare data between quarters

      I'm relatively new to QlikView.  We're running version 11.2.


      I need to compare data for current three months to last three months to the last three months, etc. for a total of 12 months by Business Service (Business Service-CI ID) within a Business Process (comes from another table, uses the Business Service-CI ID to join). 


      I've flattened the file to this point.  This is the file format as of now in the script. 


         [Business Service-CI ID],
         [Cost Element Type],
      resident Labor_Dollars_1
      order by 
         [Business Service-CI ID],
         [Cost Element Type]; 
      drop table Labor_Dollars_1;


      I'm trying to calculate the percentage change between the sets of quarters and a % Change Total.  WhichQuarter will have values of 1-4 in it to denote which quarter the dollars are for.  Cost Element Type values are either Internal or External.


      Please see the attached document for extra info and screenshots.


      I've tried various expressions and I can't get any of them to work.  I'm not sure how to make a set analysis work either.  I would like to flatten the file a step further where the data for each Business Service is all on one row but I haven't figured that out either. I tried a nested IF statement in the script, but it returned a error.


      Is there a way to do this what I'm trying to accomplish?


      Any help is appreciated.