3 Replies Latest reply: Oct 19, 2018 10:07 AM by Gervis Suárez RSS

    Values counted repeatedly in Qlik Sense Pie Chart

    Chia Jia Xiang

      Context:

      For TABLE 1, I have created a column "RECEIVE_SCHOLARSHIP" , students with TYPE = 'SCHP' or 'SCHS' and STATUS = 'A'., the column will display 'YES'.

      if( STATUS = 'A' and (N_FA_TYPE = 'SCHP' or N_FA_TYPE = 'SCHS'),'Yes','No') as RECEIVE_SCHOLARSHIP


      Student with TYPE = 'BURS' are not awarded scholarship which RECEIVE_SCHOLARSHIP will display 'NO'.

       

      Now i left keep the Table 2(Main Table) and load the data.

       

      The issue is that when i put this data into a PIE CHART, students that were awarded scholarship are also counted in the "students that were not awarded scholarship". This is because a student can have both SCHP and BURS at the same time, thus it will be counted in both the "awarded scholarship" and  "students that were not awarded scholarship".


      What i want to be able to do is IF student has been awarded 'SCHP' and 'BURS' at the same time, only display this student as "awarded scholarship".

       

      Thank you for reading, and please do drop a reply to help me.

       

      TABLE 1:

      STUDENT_LIDTYPESTATUSRECEIVE_SCHOLARSHIP
      1000982SCHPAYES
      1000982BURSANO
      1000982BURSANO
      1000982BURSANO
      1000982BURSANO
      1000982BURSANO
      1000982SCHPAYES
      1001124BURSANO
      1001124SCHSAYES

       

      TABLE 2(Main Table):

      STUDENT_LIDPROG_STATUSADMIT_TERM
      1000982AD1730
      1000982AC1730
      1000982AC1730
      1000982CM1730
      1000982AD1420
      1000982AC1420
      1000982AC1420
      1000982AC1420
      1000982CM1420
      1001124AD1410
      1001124AC1410
      1001124DC1410
      1001124AD1720
      1001124AC1720
      1001124AC1720