Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is there a way to use the OR function in script

Hi,

I am trying to use an OR function in Qlkiview while loading the script

  IF(OR(Accept_compliance = 'No',

  Accept_compliance ='Expired',

  Convert_compliance ='Expired',

  Convert_compliance ='No',

  Closed_compliance ='No',

  Closed_compliance ='Expired'),'No','Yes')

  as Total_Compliance

Is there a way I can achieve the same or can anyone help me with a possible workaround in the script to load the data.

Note: All the compliance are created as dimensions using the If condition in the script.

Any help on the issue will really be helpful as I am really stuck.

Regards,

Prathamesh Sable

5 Replies
tresesco
MVP
MVP

Try like:

If( Accept_compliance = 'No' Or Accept_compliance ='Expired' Or ........

northerner
Partner - Contributor III
Partner - Contributor III

This should work:

if
(
     Accept_compliance = 'No'
     or Accept_compliance ='Expired'
     or Convert_compliance ='Expired'
     or Convert_compliance ='No'
     or Closed_compliance ='No'
     or Closed_compliance ='Expired',
     'No',
     'Yes'
)
as Total_Compliance

In Qlikview OR is an operator, not a function

sujeetsingh
Master III
Master III

Of course you can use OR and AND both

jagan
Luminary Alumni
Luminary Alumni

Hi,

Use OR like below in Qlikview

LOAD

*,

IF(Accept_compliance = 'No' OR

  Accept_compliance ='Expired' OR

  Convert_compliance ='Expired' OR

  Convert_compliance ='No' OR

  Closed_compliance ='No' OR

  Closed_compliance ='Expired','No','Yes')

  as Total_Compliance

FROM DataSource;

Hope this helps you.

Regards,

jagan.

marcus_sommer

Try this:

if(match(Accept_compliance, 'No', 'Expired') or match(Convert_compliance, 'No', 'Expired') or match(Closed_compliance, 'No', 'Expired'),'No','Yes')

- Marcus