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: 
Anonymous
Not applicable

Same value not evaluated

Hi All

How to evaluate same value of row. Please have a look on the screen and attached QV sample

The circled red are not evaluating as already initially. Is there any way for?

Capture.PNG

Thanks a lot

7 Replies
MK_QSL
MVP
MVP

If(Match(City,'Buffalo', 'Rochester', 'Syracuse'), 'WNY',

  If(Match(City,'New York','Yonkers'), 'SNY',

     If(Match(City,'Edison'), 'ENJ',

    If(Match(City,'Elizabeth', 'Union'), 'WNJ', null()))))

fred_s
Partner - Creator III
Partner - Creator III

I'd add 'Zone' to the script, keep IT simple 😉

Grtz Fred

Anonymous
Not applicable
Author

Manish

This is fine but the question is like

If 'A' than -> 'ABC'

but if A & B than 'ABCDE'

In this case 'A' is already evaluated so in next condition 'A' not fulfill

Thanks

Anonymous
Not applicable
Author

Hi Fred

I appreciate your reply. But in my QV there are 150 line items.

Some of them replicate with other line item combination.

For that I need to have some solution so fulfill the condition.

Thanks

anbu1984
Master III
Master III

If you have 'A', then is your expected output is 'ABC' and 'ABCDE'??

pokassov
Specialist
Specialist

Hi Satish!

If you don't want to change field"City", you can

1. Add another field "KeyCity"

2. Add second table with zone

there is the script:

t1:

LOAD * INLINE [

    City

    Buffalo

    Rochester

    Syracuse

    New York

    Yonkers

    Edison

    Union

    Elizabeth

];

t2:

LOAD

City as City,

City as KeyCity

Resident t1;

DROP Table t1;

t3:

LOAD  * Inline [

    KeyCity, Zone

    Buffalo, NY

    Rochester, NY

    Syracuse, NY

    New York, NY

    Yonkers, NY

    Edison, NJ

    Union, NJ

    Elizabeth, NJ

    Buffalo, WNY

    Rochester, WNY

    Syracuse, WNY

    New York, SNY

    Yonkers, SNY 

    Edison, ENJ

    Union, WNJ

    Elizabeth, WNJ    

];

MK_QSL
MVP
MVP

What is the output you are looking for?