Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

if statement problem

Hello to all of you,

i have a problem. I want to check if two numbers are available in my table when i selected my Sell Nr.

The if statement doesn't work and i don't know why.

Here are the Statement:

if((NR=123456 and NR=7891011),'Yes','No')

For the selected Sell Nr there are both number (NR) available, so it should be on "Yes" and not of "No".

What is my mistake?

Kind Regards

1 Solution

Accepted Solutions
MVP
MVP

Re: if statement problem

In a text box:

=If(Index(Concat(DISTINCT NR), '123456') And Index(Concat(DISTINCT NR), '7891011'), 'Yes', 'No')

5 Replies

Re: if statement problem

You used AND but the condition is OR ... try and let me know

anbu1984
Honored Contributor III

Re: if statement problem

When you select one NR, other NR is not available. So you didnt result

Can you explain with source data what are you trying to do?

MVP
MVP

Re: if statement problem

In a text box:

=If(Index(Concat(DISTINCT NR), '123456') And Index(Concat(DISTINCT NR), '7891011'), 'Yes', 'No')

Not applicable

Re: if statement problem

Hello,

i have a table (head) that call "Sell" there is a Sell Nr. Then i have a table with the details "Sell details".

The both tables are linked over the SellNr. In the "Sell details" are two lines and so i have in the column "NR" two numbers. But i only want to calculate when both numbers are in the "Sell details". So i want to say, only when the numbers are in this, then you have to do.... I only have test it with Yes or No to prove if this are in the table.

anbu1984
Honored Contributor III

Re: if statement problem

Can you post sample data

Community Browser