
Creator
2022-02-17
04:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 |
1,078 Views
1 Solution
Accepted Solutions

.png)
Former Employee
2022-02-17
10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')
1,001 Views
3 Replies

.png)
Former Employee
2022-02-17
06:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
Coalesce(Only(Flag),'Partial')
1,038 Views

Creator
2022-02-17
09:53 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Henric for your reply,
I have updated the exact requirement, please check and suggest.
1,014 Views

.png)
Former Employee
2022-02-17
10:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')
1,003 Views
