Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Development

ABC
1ayes
1byes
1cyes
2dno
2eno
3fyes
3gno
3hyes
3ino
4jyes

I have the above Data and need to get like below

 

ABCIs_slipped
1ayesY
1byesY
1cyesY
2dnon
2enon
3fyespartial
3gnopartial
3hyespartial
3inopartial
4jyesY

the requirement is for each A Is_slipped is 'Y' when C is yes for all B and  Is_slipped is 'N' when C is no for all B and Is_slipped is 'Partial'  when C is either yes or no  for all B

Test:

LOAD A,

     B,

     C

FROM

(ooxml, no labels, table is Sheet1);

left join(Test)

LOAD A,

  Sum(if(C='yes',1)) as Y,

  sum(if(C='no',1)) as N

  

Resident Test

Group by A;

Left Join(Test)

LOAD A,

  Sum(if(C=0,1)) as dummy,

  if(Y=0,'No',if(N=0,'Yes','Partial')) as is_slipped

Resident Test

Group by A;

But throwing error as "Invalid Expression". Please suggest.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The following given me the answer.. thank you

Test:

LOAD A,

     B,

     C

FROM

(ooxml, embedded labels, table is Sheet1);

Left Join(Test)

LOAD A,

  if(sum(if(not isNull(B),1))=sum(if(C='yes',1)),'yes', if(sum(if(not isNull(B),1))=sum(if(C='no',1)),'No','Partial')) as is_slipped

Resident Test

Group by A;

View solution in original post

1 Reply
Anonymous
Not applicable
Author

The following given me the answer.. thank you

Test:

LOAD A,

     B,

     C

FROM

(ooxml, embedded labels, table is Sheet1);

Left Join(Test)

LOAD A,

  if(sum(if(not isNull(B),1))=sum(if(C='yes',1)),'yes', if(sum(if(not isNull(B),1))=sum(if(C='no',1)),'No','Partial')) as is_slipped

Resident Test

Group by A;