1 Reply Latest reply: Feb 14, 2017 2:01 AM by Rod Stewart RSS

    Qliksense-Pivot custom Total

    vivek pv

      Hi QV Users,

      I have requirement where I need to sum the values for specific rows in pivot table.I'm doing this in QlikSense.

      My Pivot table is like below.


      S. NO  NAME                 JAN-2001    FEB-2001

      1            Raj                        100            200

      2            Stella                     50              75

      3            Arjun                     200            350

      4            Sunny                     90            110

      5            Jack                      300            400



      I want to sum the amount for certain names and name it as TOTAL_HR, TOTAL_IT and TOTAL_ADMIN



      S. NO    NAME                 JAN-2001    FEB-2001 

      1           Raj                        100            200

      2           Stella                     50             75

      3               TOTAL_HR         150            275

      4            Arjun                    200            350

      5              TOTAL_IT           200             350           

      6            Sunny                    90            110

      7            Jack                     300            400

      8               TOTAL_ADMIN   390            510

      The above fields which are in RED are newly added and these contains sum of certain values.

      like,TOTAL_HR is sum of AMOUNT RAJ and Stella.

      Can any one help me on this..?



        • Re: Qliksense-Pivot custom Total
          Rod Stewart

          Hi Vivek,


          I think the simplest way to do this would just be to create a new data item such as "Department" with the values "TOTAL_HR" etc in it, it might even be a data item that already exists in your source data. Then you could simply add it as a dimension to your pivot table and it would be summed automatically in the manner you've described.

          Alternatively you could create a calculated dimension, called "Department" or whatever is appropriate, with a definition like:


          if(NAME = 'Raj' or NAME = 'Stella', 'TOTAL_HR',

             if(NAME = 'Arjun', 'TOTAL_IT', 'TOTAL_ADMIN'))


          But that approach would be horribly hard to maintain and pretty much useless with large or changing dimension values.


          Apologies if I've misunderstood the point of your question.