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

How count in the greyed selection

Hello,

I have a question: how to count in the grey selection:

For instance, i have a field  and i want to count how many are on the white field

( for this no problem i use =count( distinct Field)    )

but how many are on the grey selection?

I try  count( distinct (1-$) Field)   but this is not good (because don't want to reverse the all selection,just reverse the selection in a chosen field)

Someone have a idea?

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

count(  Distinct <{Field1={"5"},{Field2=}>  Field1)   i find this in another discution

This is what i want.

http://community.qlik.com/message/115823#115823

View solution in original post

8 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I think you need =GetExcludedCount(Field).

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thx Jonathan,

Butif i want to add filters in the count can i with this fonction?

I give you a simple example but i want to use the count with others conditions like <{ }>.

Do you have another idea?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Either you want to count the excluded (grey) values or you want to count vlaues based on a filter. These are two different requirements and they would be met differently.

The excluded count will respect the selections you make in any fields that affect the field that you are counting.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I will be more specific:

I have an expression witch count in the current selection,

but I want to count this in the opposite selection (or ignore the selection or ignore the selection in a choosen field)

my expresion is   =count(  Distinct <{Field1={"5"}>  Field1).

Do you have an idea how to count how many time "5" appear in the grey selection?

Or  how many time "5" appear in the field

independently another field (for instance Field 2):

I try   count(  Distinct (1-$)<{Field1={"5"}>  Field1)     and  

         count(  Distinct <{Field1={"5"}>*<{Field2=}>  Field1)

but this is not the result I expect.

Thanks for your time and patience.

swuehl
MVP
MVP

I haven't fully understood what you are trying to achieve yet, maybe a small sample file or some sample data with your expected outcome might help.

Please check the Help file, in the set analysis section, you find a description of using set analysis with implicite field value definitions, namely the e() function. I assume that's what you are looking for.

Not applicable
Author

count(  Distinct <{Field1={"5"},{Field2=}>  Field1)   i find this in another discution

This is what i want.

http://community.qlik.com/message/115823#115823

swuehl
MVP
MVP

Ok, if this it what you want, good to hear that you found a solution.

But I believe this syntax does not 'reverse the selection in a chosen field' as required above.

It is clearing the selection in one field in the context of the set expression.

But maybe I am still misunderstanding what you are trying to achieve.

Regards,

Stefan

Not applicable
Author

Hi stefan

Yes this expression dont reverse the selection but we can make a subtraction:

count(  Distinct <{Field1={"5"},{Field2=}>  Field1) -count(  Distinct <{Field1={"5"}>  Field1)

Thanks