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: 
vardhancse
Specialist III
Specialist III

Condition

Hi,

Have a requirement is that.

creating one field based on condition:

if(A_Row_Count = B_Row_Count AND A_Row_Count = C_Count AND C_Count = B_Row_Count,'Matched','Not Matched') as Count_Status

But my requirement is that:

if field C_Count have data above condition will work out and show the count_status as Match/Mot Match

if field C_Count have no data, then it should check only field A_Row_Count & B_Row_Count and show the status as Match/Not Match

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Try this

If(Sum(C_Count)>0,

  if(A_Row_Count = B_Row_Count AND A_Row_Count = C_Count AND C_Count = B_Row_Count,'Matched','Not Matched'),

  if(A_Row_Count = B_Row_Count ,'Matched','Not Matched')

) as Count_Status

let me know ...

sasikanth
Master
Master

Try some thing like below

if(A_Row_Count = B_Row_Count AND if(not is null(C_Count), A_Row_Count = C_Count AND C_Count = B_Row_Count),'Matched','Not Matched') as Count_Status

Anonymous
Not applicable

you can check length of C_COUNT or you can use isnull function and based on that modify your if statements. It will have basically 2 ifstatements

if( len(C_COUNT)=0,

<first if statement)>,

<second if statements>)