Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Try like:
If( Accept_compliance = 'No' Or Accept_compliance ='Expired' Or ........
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
Of course you can use OR and AND both
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.
Try this:
if(match(Accept_compliance, 'No', 'Expired') or match(Convert_compliance, 'No', 'Expired') or match(Closed_compliance, 'No', 'Expired'),'No','Yes')
- Marcus