Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sunitha_chellaiah
Partner - Creator
Partner - Creator

If condition is working only on selection

Hi All,

I am using below mentioned condition, but it is working only on selection.

IF(([IMSTKT - Stocking Type - Product Code]='S' AND MaxString([IMURCD - User Reserved Code])='Y') OR MAX(isE_catalogue_Kit)=1,'normal offer')

Please see the attached screenshot. I have used the mentioned expression in the column 'Limited/ normal offer'

5 Replies
Anil_Babu_Samineni

Because, If..else condition works based on input

IF(([IMSTKT - Stocking Type - Product Code]='S' AND MaxString([IMURCD - User Reserved Code])='Y') OR MAX(isE_catalogue_Kit)=1,'normal offer', 'Provide What you want to show If nothing selected')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunitha_chellaiah
Partner - Creator
Partner - Creator
Author

But in limited/normal offer column, normal offer should appear. Now it is showing null.

anushree1
Specialist II
Specialist II

please try: IF(([IMSTKT - Stocking Type - Product Code]='S' AND MaxString([IMURCD - User Reserved Code])='Y') OR MAX(isE_catalogue_Kit)=1,'normal offer','limited offer')

sunitha_chellaiah
Partner - Creator
Partner - Creator
Author

Please see the attached screenshot. I have selected type 'S'. Now in the limited/normal offer column, it is appearing as normal offer. but if I don't do selection then it is showing null.

The column should 'normal offer' based on my expression without any selection.

anushree1
Specialist II
Specialist II

So, the selection imiltm-2nd... has varied options on IMST-Stock..., so there is no one to one mapping in this case hence qlik would not be able to identify the correct value, you will need to use set analysis to get this working , if not create this a column in the script