Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

lavrendis
New Contributor

Relational operator in set analysis

Hello,

i am trying to filter a field through set analysis with a set of values less than a number but i cannot make it work. My syntax is:

count({$<[Délai statut 6 - Statut 3]={"<5"},[Délai statut 6 - Statut 3]-={"999999"},[Sélection KPI]={"1"},[Regroupement]={"PRO","FIL"}>}[Commande client])

WHat is not working is the [Délai statut 6 - Statut 3]={"<5"}. If i put or notit gives the same result.

Thank you,

Lawrence

Tags (1)
1 Solution

Accepted Solutions
prat1507
Valued Contributor

Re: Relational operator in set analysis

Hi

Please use the below expression:

count({$<[Délai statut 6 - Statut 3]={"<5"},[Sélection KPI]={"1"},[Regroupement]={"PRO","FIL"}>}if([Délai statut 6 - Statut 3]<>999999,[Commande client]))


Regards

Pratyush

8 Replies
prat1507
Valued Contributor

Re: Relational operator in set analysis

Hi

Please use the below expression:

count({$<[Délai statut 6 - Statut 3]={"<5"},[Sélection KPI]={"1"},[Regroupement]={"PRO","FIL"}>}if([Délai statut 6 - Statut 3]<>999999,[Commande client]))


Regards

Pratyush

lavrendis
New Contributor

Re: Relational operator in set analysis

Hi, my problem is with the [Délai statut 6 - Statut 3]={"<5"} as mentioned above.

Thanks,

Lawrence

prat1507
Valued Contributor

Re: Relational operator in set analysis

Hi Lawrence

That's not a problem, since you're providing two conditions for the same field, it is getting confused and is using the second condition. I understand what you're trying to achieve but it is not possible that way.

Regards

Pratyush

ahaahaaha
Honored Contributor

Re: Relational operator in set analysis

Hi all,

In the Set Analysis can be used multiple conditions for a single field. If the logical intersection (And), the set expression to be written approximately as follows (in each condition curly braces)

{<...{Condition1}*{Condition2}...>}

If the logical addition (Or), the set expression to be written approximately as follows


{<... {Condition1} + {Condition2} ...>}


Conditions themselves inside the curly brackets should also be presented by the expression Set Analisys.

Regards,

Andrey

prat1507
Valued Contributor

Re: Relational operator in set analysis

Thank you for such a clear explanation.

Regards
Pratyush

lavrendis
New Contributor

Re: Relational operator in set analysis

Hi Andrey,

could you pleasegive the exact syntax for my case?

Thank you,

Lawrence

ahaahaaha
Honored Contributor

Re: Relational operator in set analysis

Hi Lawrence,


It should be like this, if I understand correctly, what is required in the selection

count({$<[Délai statut 6 - Statut 3]-={"999999"}>*<[Délai statut 6 - Statut 3]={"<5"},[Sélection KPI]={"1"},[Regroupement]={"PRO","FIL"}>}[Commande client])


Regards,

Andrey

ahaahaaha
Honored Contributor

Re: Relational operator in set analysis

I tried to simulate your expression, as I understand it. An example of the attached file.

The application loaded the numbers 1 to 10 in the field ID. Then indicators are created with Set Analisys.  Play selections, please, in the ID field.

Regards,

Andrey

Community Browser