3 Replies Latest reply: Nov 1, 2012 12:39 PM by Lav Jain RSS

    Pivot/straight table using multiple dimensions in single column

      Hi,

       

      I am wondering if this is possible. We are wanting to remake a report that users are having to manually make now days using QlikView, and I am wondering if it is possible to do in a single straight table or pivot table. The problem comes in that the columns are not only based on different dimensions, but can also be different calculations.

       

      The report would have data as follows:

      Monthly
      Sep-12Sep-11
      % change in State A subscribers10%2%
      % change in State B subscribers5%-4%
      % change in State C subscribers7%8%
      # of new subscribers from telemarketing5020
      # of new subscribers from door to door405
      % of new subscribers from telemarketing30%10%
      % of new subscribers from door to door25%15%

       

      So the first 3 lines in the example are a percet change based on locaiton of all subscribers, the next two is the total number of new subscribers based on where they came from, and the next 2 are the percentage of the above 2 numbers.

       

      Is this possible in a straight or pivot table? I am wondering if I am just going to have to seperate the items out into seperate tables for this to work, but thought I would ask the question before doing this. (I.E. have one table for the first 3, another table the next 2, and then a 3rd table for the final 2).

       

      Thanks ahead of time

        • Re: Pivot/straight table using multiple dimensions in single column
          Lav Jain

          in ur load script, create an inline wizard;

           

          load * inline[

           

          Dim,DimValue

           

          1,  % change in State A subscribers   

          2, % change in State B subscribers   

          3, % change in State C subscribers   

          4, # of new subscribers from telemarketing   

          5, # of new subscribers from door to door             

          6, % of new subscribers from telemarketing   

          7, % of new subscribers from door to door

          ];

           

          now in ur straight table, use DimValue as ur dimension & in expression1(Sep-12) use

           

          if(Dim=1,sum({<ActualDim={Actual Dim value for which u need say A 10%}>} Metric1)/sum({<ActualDim={Actual Dim value for which u need say A 10%}>} Metric2),

          if(Dim=2,sum({<ActuaDim={Actual Dim value for which u need say B 5%}>} Metric1)/sum({<ActualDim={Actual Dim value for which u need 5% say B}>} Metric2))

           

          since ur result is in %, so i've used division in expr assuming ur actual expr must be something like this

          the if can be expanded to Dim7

           

          Same for expr2

           

          Hope it helps