Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
risabhroy_03
Partner - Creator II
Partner - Creator II

Nested If condition

I have 3 main columns - Internal Part, Customer and Customer Part.

My Customer is coming from different sources and I have concatenated all sources.

So for a single Internal Part and a single Customer, I am getting multiple Customer Part.

I want only a single Customer Part against each.

If my Source = CISLI245 and Customer Part is not blank then take from there, If blank then go to Source TCIBD004

If my Source = TCIBD004 and Customer Part is not blank then take from there,  If blank then go to Source TDUIL059

If my Source = TDUIL059 and Customer Part is not blank then take from there,  If blank then go to Source TDUIL052

If my Source = TDUIL052 and Customer Part is not blank then take from there,  If blank then print whatever was coming in CISLI245

 

 

if([Source]='CISLI245' and Len([Customer Part])>1,[Customer Part]
,if([Source]='CISLI245' and Len([Customer Part])<=1,

if([Source]='TCIBD004' and Len([Customer Part])>1,[Customer Part]
,if([Source]='TCIBD004' and Len([Customer Part])<=1,

if([Source]='TDUIL059' and Len([Customer Part])>1,[Customer Part]
,if([Source]='TDUIL059' and Len([Customer Part])<=1,

if([Source]='TDUIL052' and Len([Customer Part])>1,[Customer Part]
,if([Source]='TDUIL052' and Len([Customer Part])<=1,[Customer Part],[Customer Part]


))

))

))

)) as [Customer Part Final]

 

 

 

Please help

 

Labels (5)
1 Reply
bhaskar_sm
Partner - Creator III
Partner - Creator III

Please help us understand the input data and your expected output it could help us suggest the appropriate solutions