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: 
anagharao
Creator II
Creator II

Find values according to conditions in a different column

Hi All,

I would like to automate the process of checking values against conditions. I have a set of values and conditions on them in two separate tables(Data and Rule in the attached). The conditions check if the columns are blank, zero... (the attached has a subset of the rules).

I would like to arrive at a result of the rule for every row in the data set according to the rule id in that row.

Result should be :

  

ABRule IDRule Result
001yes
002yes
011yes
012no
101no
102yes
111no
112no

Please do help me out with this,

13 Replies
anagharao
Creator II
Creator II
Author

what if the Rule ID is a string

Anonymous
Not applicable

You are using different condition for every rule .so , I think  you need to do it manually for every rule.Lets see few more solutions coming up .

effinty2112
Master
Master

Use the Match function along with Pick

Pick(

Match(RuleID, ' ... ID of First Rule Here ... ', , ' ... ID of Second Rule Here ... ', ...),

, Rule1, Rule2, ...)

Anonymous
Not applicable

Hi

You can try this but this is not much efficient solution for your problem.

Rule:

LOAD A,

     B,

     [Rule ID],

     if(A='0','Yes','No') as RuleResult

    

FROM

(ooxml, embedded labels, table is Data)

where [Rule ID] = '1';

LOAD A,

     B,

     [Rule ID],

     if(B='0','Yes','No') as RuleResult

    

FROM

(ooxml, embedded labels, table is Data)

where [Rule ID] = '2';