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: 
Not applicable

Help on Flagging

Hello

I have a scenario to check the field whether the name exists for the ID and present it in the column

   

IDENTITYTATAESSILORIBMBOSCH
AAATATA0110
AAAESSILOR1010
AAAIBM1100
BBTATA0111
BBESSILOR1011
BBIBM1101
BBBOSCH1110

the above table is grouped by ID and ENTITY and I need to find whether the ID can be transferred to other entities

Ideally I am looking for the above table

1 Solution

Accepted Solutions
Not applicable
Author

Thanks thats exactly what I want.

View solution in original post

6 Replies
zhadrakas
Specialist II
Specialist II

check this

Source_Data:
LOAD * INLINE [
ID, T1
1, A
2, B
3, C
4, D
5, E
]
;

Result:
Load ID,
T1,
Previous(T1) as T2
Resident Source_Data;

drop table Source_Data;

Not applicable
Author

I need the same output as shown on the image

Thanks

zhadrakas
Specialist II
Specialist II

please share your source data.

Then i can help you.

Regards

Tim

MK9885
Master II
Master II

How does your raw data or script looks like?

Please also post that

Available script or data will be helpful.

Anonymous
Not applicable
Author

Hi,

I have done a script who shows the exact flag result.

test:

load * Inline [

ID, ENTITY

AAA, TATA

AAA, ESSILOR

AAA, IBM

BB, TATA

BB, ESSILOR

BB, IBM

BB, BOSCH

]

;

T1:

LOAD Concat(ENTITY,' ') as Check,

    ID

Resident test

GROUP BY ID ;

LEFT JOIN( test)

LOAD *

Resident T1;

drop table T1;

   

Table_Flag:

LOAD ID,

     ENTITY,

     if(SubStringCount(Check,'TATA')=0 OR ENTITY='TATA',0,1) as TATA,

     if(SubStringCount(Check,'ESSILOR')=0 OR ENTITY='ESSILOR',0,1) as ESSILOR,

     if(SubStringCount(Check,'IBM')=0 OR ENTITY='IBM',0,1) as IBM,

     if(SubStringCount(Check,'BOSCH')=0 OR ENTITY='BOSCH',0,1) as BOSCH

Resident test;

DROP Table test;

Best regards,

Cosmina

Hope this helps

Not applicable
Author

Thanks thats exactly what I want.