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

Items existing in a table

Hi

I have items that appear on more than one price lists.  If a item appears on say, Price List A, it must give me '2' otherwise it must give me '1'.

How do i do the scripting on the front end.

I've tried this formula  if(Price List = 'Price List A', 2,1) , however the result for that item appears on two lines, which i dont want.

Please can you help.

kind regards

Nayan

13 Replies
adnan_rafiq
Partner - Creator II
Partner - Creator II

You can also try exist function if you are not comparing row by row

Not applicable
Author

Hi Adnan

I have not used the exist function before. How would I apply it.

Kind regards

Nayan

adnan_rafiq
Partner - Creator II
Partner - Creator II

you will apply in your script, basically like

load if(exists(item),2,1) but for that you have to rename pricelist2 field

as item. or you can chose any other name.

It will check if item name you are currently loading exist in previously in

the same field. that , if pricelistA has item value "abc" and you are

loading item "abc" it will make condition true and return 2 else 1.

Not applicable
Author

Thank you Adnan.