Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

Merging two flags into one

How to merge two Flags into one. need to combine all values.

Create common flag (Flag1 & Flag2)
Common_Flag - Test1, Test2, Test3 Test4,

NoConcatenate
T1:
LOAD *,

IF(MonthDiff >= 1 AND MonthDiff <= 36, 'Test1',
IF(MonthDiff >=37 AND MonthDiff <= 60, 'Test2','Test3')) AS Flag1;

LOAD *,
IF(ISNULL(Max_DT) = -1, 'Null', ((year(DateKY)*12)+month(DateKY)) - (((year(Max_DT)*12)+ month(Max_DT)))) AS MonthDiff


Resident Temp;
DROP Table Temp;

NoConcatenate
T2:
LOAD
*,
If(WildMatch(Flag1,'Test1'),
If(Flag1,'Test2','Test1'),'Test4') as Flag2

Resident T1;

1 Reply
Brett_Bleess
Former Employee
Former Employee

Karan, consider attaching your app or a sample, these types of posts generally get better responses when doing that.  This will kick things back up the list too, so someone may see it fresh and leave you something, but if you can attach an app, that should help.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.