Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
grajmca_sgp123
Creator
Creator

IF Else condition on group by

 

Hi ,

I have a requirement to show, if  CCA_ROW_34B has more than 2 GROUP_CODE values I have to show as 'Partial', else show as 'full'.

 

GROUP_CODE CCA_ROW_34B Expected Output
  3 - Undated capital  Full
  4 - Subordinated notes  Partial
CFS1 4 - Subordinated notes Partial
HGHQ 1 - Ordinary notes Full
HGHQ 2 - Third dollar notes Full
HGHQ 4 - Subordinated notes Partial
Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

If there are no NULLs in GROUP_CODE, then
   Coalesce(Only(CCA_ROW_34B),'Partial')
should work.

Otherwise, you could try
   If(Count(CCA_ROW_34B)<=1, Only(CCA_ROW_34B), 'Partial')

View solution in original post

3 Replies
hic
Former Employee
Former Employee

Try

Coalesce(Only(Flag),'Partial')

grajmca_sgp123
Creator
Creator
Author

Thank you Henric for your reply,

I have updated the exact requirement, please check and suggest.

hic
Former Employee
Former Employee

If there are no NULLs in GROUP_CODE, then
   Coalesce(Only(CCA_ROW_34B),'Partial')
should work.

Otherwise, you could try
   If(Count(CCA_ROW_34B)<=1, Only(CCA_ROW_34B), 'Partial')