Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Values counted repeatedly in Qlik Sense Pie Chart

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
3 Replies
Anonymous
Not applicable
Author

Ni hao! my friend i have a question for you with this thing ¿can you extract the data with a DISTINCT function to group the STUDENT_LID? if you can do this, the problem will be solved!

I wait for your answer.

Greetings!!

Anonymous
Not applicable
Author

Ni hao! Thanks for your reply. The data cannot be extracted with a Distinct function to group the STUDENT_ID, because the it wont be able to detect if the students have received scholarship or not. Do you have any idea in mind?

I look forward to your answer.

Anonymous
Not applicable
Author

Ni hao! well i don´t know too much about Qlick Sense but if you select just the student_lid had the conditions "SCHP" or "SCHS" to show in the PIE CHART. with an if condition a count it, and i have a question:¿why do you have many times repeadly a student_lid in the table? The logic says you most update the field TYPE to every student_lid has the condition  receive a scholarship

Greetings!