Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am writing the below if condition,
if(IsNull(Modality),'Null Modality',Modality),
if(IsNull(District),'Null District',District),
if(IsNull(Norm),'No Norm',Norm) as comment
Can you please help me bec the else condition is not passing is it because i am closing the brace at Modality and Distrcit.
Thanks,
Bharat
In above case statement you don't have if Modality is null then "'Null Modality" else value of field Modality and then you were checking for District and Norm in the statement to come up with Comment field like you have in original question.
Try following
If(IsNull(Modality), 'NULL Modality',
If(IsNull(District), 'NULL District',
If((IsNull(Norm) or Norm='0'), 'NO Norm', 'Include'))) as Comment
may be this ?
if(IsNull(Modality),'Null Modality',Modality) & '/' &
if(IsNull(District),'Null District',District) & '/' &
if(IsNull(Norm),'No Norm',Norm) as comment
Hi Olivier,
Thanks for your reply.. Can you pleas tell me what does & '/' & do and why we need to specify..
Is it not possible to do without this..
if(IsNull(Modality),'Null Modality',Modality and
if(IsNull(District),'Null District',District and
if(IsNull(Norm),'No Norm',Norm)))
or replace is null with Modality = 0
this is to concatenate in the same field comment
& concatenates two strings
so comment could be : 'Null Modality/District num/No Norm'
Sorry Ishtdeep getting error
Thank you,
But i need if first condition is not satisfied then only second condition and else
if(IsNull(Modality),'Null Modality',Modality),
if(IsNull(District),'Null District',District)
Please let me know if you need anything more..
Can you share data in excel format?
if( IsNull(Modality), 'Null Modality' , Modality)
if(condition , then , else) https://help.qlik.com/en-US/sense/April2018/Subsystems/Hub/Content/Scripting/ConditionalFunctions/if...
It will never work with the way you have written. Also not understanding what you are trying to achieve. is it in chart or script?
Did you try this - or replace is null with Modality = 0??