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: 
D19PAL
Creator II
Creator II

If statement per id number

Hi,

How do I do an if statement or any other way for each I'd check if theres tick for group name and check if there is a director in group name.

 

I'd,group name,tick

1,manager,tick

1,director,

2,manager, tick

2,manager 

 

Thanks

 

6 Replies
AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Hello,

What is the expected output ?

e.g

If(Group Name = 'Director', 1 ,0 ) as Flag

 

 

D19PAL
Creator II
Creator II
Author

I guess this will do it by rows, I want to check all rows by ID, so if ID 1 has 5 rows, I want to check if any of those rows in group name have director.

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Something like below ? If I understood correctly.

If(Aggr(Count({<Group = {'Director'}>}ID),ID) > 0,'Present','Absent')

AshutoshBhumkar_0-1637766132862.png

Thanks,

Ashutosh

 

D19PAL
Creator II
Creator II
Author

Sorry, I was hoping for in the script.

Thanks 

 

D19PAL
Creator II
Creator II
Author

I think I've done it, using group by

AshutoshBhumkar
Partner - Specialist
Partner - Specialist

Great. You can use Group by in script and Aggr() in the expression.