Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

Nested If can we use to show multiple records in single row for different column

Hi All,

    I have one requirement my case is getting refers to multiple department and I wanted to show them into a single row.For e.g

If I have attended class A then it will show as 'YES' and then I moved to Class B then it will show 'YES' and I was not there in class C,D and E so it will pickup 'NO' .

     In other scenario suppose I was present in  A,C,D and E then it will show 'YES' and for B it will show 'NO' and so..on.

Now my concern is that here am getting multiple rows for single Roll_No .I wanted to show the O/P in single row with all combination of 'YES' & 'NO' If will go for IF statement it will create a essay of code which I don't wanna prefer and i don't know will it be feasible or not.

PFA

Regards,

KK

New to QlikView

KK
11 Replies
Anil_Babu_Samineni

Expected result? And where you want to try this, I meant in script/UI??

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Karim_Khan
Creator III
Creator III
Author

PFA expected O/P file and I wanted to do this in Script;

KK
Anil_Babu_Samineni

Does Second scenario is subsequent of First scenario?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Karim_Khan
Creator III
Creator III
Author

NO its not subsequent both are inter related.

KK
evan_kurowski
Specialist
Specialist

If you were open to UI approach (i see you did mention leaning to script), maxstring() and straight table should work.  but only so long as 'Yes' & 'No' sort.  (if the example changed strings, then adaptation would be needed)

  Qlik_forum_image.png

Karim_Khan
Creator III
Creator III
Author

No Evan I need this at script level will try some approach

KK
evan_kurowski
Specialist
Specialist

The premise is pretty much the same,  noconcatenate and dropping the original table unconfused the matter.

[UNGROUPED]:
LOAD * INLINE [
     Roll_No, A, B, C, D, E
     40608, No, No, No, No, No
     40608, No, No, Yes, No, No
     40608, Yes, No, No, No, No
]
;


[GROUPED]:
NOCONCATENATE LOAD Roll_No, MaxString(A) AS A,MaxString(B) AS B,MaxString(C) AS C,MaxString(D) AS D,MaxString(E) AS E
RESIDENT UNGROUPED GROUP BY Roll_No;

DROP TABLE UNGROUPED;
 

Anil_Babu_Samineni

Sorry, For late reply, I missed out this thread.

So, Once if you are not there in the list for each subject you should've pick where you attended which called "Yes" it it?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anil_Babu_Samineni

Please let us know if you found solution. dont make along for this thread

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)