Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Logic Issue (IF)

Does anyone see anything wrong with this logic?  Thanks......

if(mid(MntPlan_WARPL,1,3) = 'PMA', mid(MntPlan_WARPL,1,3),
     
if(mid(MntPlan_WARPL,1,5) = 'PMA/D', mid(MntPlan_WARPL,1,5))) as PM_Type,

Labels (1)
1 Solution

Accepted Solutions
Clever_Anjos
Support
Support

mid(MntPlan_WARPL,1,5) = 'PMA/D' would never be satisfied since mid(MntPlan_WARPL,1,3) = 'PMA' is satisfied first

View solution in original post

4 Replies
Clever_Anjos
Support
Support

mid(MntPlan_WARPL,1,5) = 'PMA/D' would never be satisfied since mid(MntPlan_WARPL,1,3) = 'PMA' is satisfied first

antoniotiman
Master III
Master III

This is correct sintax.

Ovewer if You have 'PMA/D' You also have 'PMA'

So, else condition never works.

I suggest to revers conditions.

Regards,

Antonio

tmumaw
Specialist II
Specialist II
Author

Thanks.....too early in the morning and only one cup of coffee......

Clever_Anjos
Support
Support

I´ve already have 3 cups