Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Grouping

Hi All,

Class IDNameTeacherApp 1 RequireApp 2 RequiredApp 1 ReceivedApp 2 Received
1aasYESYES
1asdYESNO
1adsNONO
1adfYESYES
2bweYESYES
2breYESNO
2bytNONO
2buiYESYES
2btrNONO
2byuYESYES
2btrYESYES

This is an dummy data i have, in the above table when ever i update App1 Received and App2 Received according to App1 Required and App2 Required (Note: if App1 required is  "Yes" then App 1 Received should be "YES" which i will do manually) its status should change.

For a same class ID we have different teacher.I want whenever all the teachers corresponding to same class ID are update, its status should change to "Done" else "Pending.If any one of the Teachers data is not updated and reaming are done , still it should so "Pending".So my Output chart should be like this:

Class IDStatus
1Done
2Pending

Any help will be appreciated.

Regards

Jyothish KC

Best Regards,
KC
1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

SCRIPT :::

=============================

Table1:

Load

  *,

  [Class ID]&[App 1 Received]&[App 2 Received] as Key1,

  [Class ID]&[App 1 Required]&[App 2 Required] as Key2 

Inline

[

  Class ID, Name, Teacher, App 1 Required, App 2 Required, App 1 Received, App 2 Received

  1, a, as, YES, YES, YES, YES

  1, a, sd, YES, NO, YES, NO

  1, a, ds, NO, NO, NO, NO

  1, a, df, YES, YES, YES, YES

  2, b, we, YES, YES,

  2, b, re, YES, NO,

  2, b, yt, NO, NO,

  2, b, ui, YES, YES,

  2, b, tr, NO, NO,

  2, b, yu, YES, YES,

  2, b, tr, YES, YES,

];

NoConcatenate

Table2:

Load

  *,

  IF(Key1 = Key2, 'OK') as OKFlag,

  IF(Key1 <> Key2, 'NOT OK') as NOTOKFlag

Resident Table1

Order By [Class ID];

Join

Load

  [Class ID],

  IF(Count([Class ID]) = Count(OKFlag), 'Done', 'Pending') as Flag2

Resident Table2

Group By [Class ID];

Drop Table Table1;

==========================

Now create a table box

for

Class ID and Flag2

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Didn't get your point of view actually...

jyothish8807
Master II
Master II
Author

Hi Manish,

When ever i update my table like this:

Class IDNameTeacherApp 1 RequireApp 2 RequiredApp 1 ReceivedApp 2 Received
1aasYESYESYESYES
1asdYESNOYESNO
1adsNONONONO
1adfYESYESYESYES
2bweYESYES
2breYESNO
2bytNONO
2buiYESYES
2btrNONO
2byuYESYES
2btrYESYES

In my Second chart Class ID status should be Done. But if i miss to update any of the entry wrongly or miss to update any entry the status should be "Pending" and when ever all the teachers corresponding to Class ID 1 are not updated properly, then also the status should be "Pending".

Regards

Jyothish KC

Best Regards,
KC
MK_QSL
MVP
MVP

SCRIPT :::

=============================

Table1:

Load

  *,

  [Class ID]&[App 1 Received]&[App 2 Received] as Key1,

  [Class ID]&[App 1 Required]&[App 2 Required] as Key2 

Inline

[

  Class ID, Name, Teacher, App 1 Required, App 2 Required, App 1 Received, App 2 Received

  1, a, as, YES, YES, YES, YES

  1, a, sd, YES, NO, YES, NO

  1, a, ds, NO, NO, NO, NO

  1, a, df, YES, YES, YES, YES

  2, b, we, YES, YES,

  2, b, re, YES, NO,

  2, b, yt, NO, NO,

  2, b, ui, YES, YES,

  2, b, tr, NO, NO,

  2, b, yu, YES, YES,

  2, b, tr, YES, YES,

];

NoConcatenate

Table2:

Load

  *,

  IF(Key1 = Key2, 'OK') as OKFlag,

  IF(Key1 <> Key2, 'NOT OK') as NOTOKFlag

Resident Table1

Order By [Class ID];

Join

Load

  [Class ID],

  IF(Count([Class ID]) = Count(OKFlag), 'Done', 'Pending') as Flag2

Resident Table2

Group By [Class ID];

Drop Table Table1;

==========================

Now create a table box

for

Class ID and Flag2

jyothish8807
Master II
Master II
Author

Thanks a lot Manish,

But there is one issue i am facing.

When ever

App 1 RequireApp 2 RequiredApp 1 ReceivedApp 2 Rece

are empty its taking it as Done. How to solve this Issue

Regards

KC

Best Regards,
KC
Anonymous
Not applicable

According to what I understood, I have done this..Please check it.

This might be helpful.