Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use set analysis

Hello

I use the following set analysis in an expression, but it doesn't work.

=Count(DISTINCT{$<[Type dossier (code)]={4},[Geraamde bedrag]={">=75000"},[Type dossier (code)]={3},[Geraamde bedrag] = {">=22000"}>}RFQ)

It only gives as result the records :
Type dossier (code)]={3},[Geraamde bedrag] = {">=22000"}

Can somebody help me ?

Thanks in advance

Marc

1 Solution

Accepted Solutions
PrashantSangle

Hi,

As swuehl said that It is not possible to modify same field twice in on set modifier.

Then you can write two different set analysis then combine their result

Like

=Count(DISTINCT{$<[Type dossier (code)]={4},[Geraamde bedrag]={">=75000"}>}RFQ)

+


Count(DISTINCT{$<[Type dossier (code)]={3},[Geraamde bedrag] = {">=22000"}>}RFQ)


Regards,



Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

20 Replies
Joseph_Musekura
Support
Support

Hi,

Can you please add a sample of your *.qvw?

Also what you expect as result.

Once both are added it will be easy to correct your set Analysis

/joseph

MK_QSL
MVP
MVP

Your syntax is looking OK to me... Difficult to find what is going wrong.

Could you please upload your sample data file or apps?

SunilChauhan
Champion II
Champion II

check weither data available for combination of conditions  you written in set analysis

some times we dont have data for set of conditions and we thought that our expression have some problem

Sunil Chauhan
swuehl
MVP
MVP

You can't modify the same field twice in one set modifier.

Not 100% sure what you want, it looks like you want to union two set modifier:

=Count(DISTINCT

{$

<[Type dossier (code)]={4},[Geraamde bedrag]={">=75000"}>

+

<[Type dossier (code)]={3},[Geraamde bedrag] = {">=22000"}

>}

RFQ)

PrashantSangle

Hi,

As swuehl said that It is not possible to modify same field twice in on set modifier.

Then you can write two different set analysis then combine their result

Like

=Count(DISTINCT{$<[Type dossier (code)]={4},[Geraamde bedrag]={">=75000"}>}RFQ)

+


Count(DISTINCT{$<[Type dossier (code)]={3},[Geraamde bedrag] = {">=22000"}>}RFQ)


Regards,



Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
swuehl
MVP
MVP

But since you want a DISTINCT count of field RFQ, this expression might not be equivalent to mine.

PrashantSangle

Hi,

Yes swuehl, you are write .

Your solution and my solution are same.

but I am just try give him more generalize solution.

That's why i reply with above solution.

Otherwise Your solution must work.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Clever_Anjos
Employee
Employee

What´s the purpose of having two conditions to same field? [Geraamde bedrag]

Not applicable
Author

Hi

Indeed, the only solution is to write two different set analysis as you have mentionned.

=Count(DISTINCT{$<[Type dossier (code)]={4},[Geraamde bedrag]={">=75000"}>}RFQ)

+

Count(DISTINCT{$<[Type dossier (code)]={3},[Geraamde bedrag] = {">=22000"}>}RFQ)

Thanks a lot

Marc