Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
segerchr
Contributor III
Contributor III

Set Analysis not equal

Hey,

the option -= does not work in my example. Can anyone help me ?

count({1<Art={'Training'},Urlaub-={'x'}>}SpielerID)/count(Total Distinct SpielerID)

The code for = does work.

count({1<Art={'Training'},Urlaub={'x'}>}SpielerID)/count(Total Distinct SpielerID).

BR. CS

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Well, it depends if you want to use OR or AND logic to combine your conditions:

=count({1<Art={'Training'},KEY =e({<Urlaub={'x'}>+<verletzt = {'x'}>+<krank = {'x'}>}) >} DISTINCT SpielerID)

=count({1<Art={'Training'},KEY =e({<Urlaub={'x'}, verletzt = {'x'}, krank = {'x'}>}) >} DISTINCT SpielerID)

View solution in original post

11 Replies
swuehl
MVP
MVP

Not really sure what your expected result is, but Urlaub shows only one value 'x', so there are no other values to use in the set when using -=

You could use the e() funcion on a key field, assuming SpielerID is an appropriate field for that:

=count({1<Art={'Training'},SpielerID =e({<Urlaub={'x'}>})>} SpielerID) /count(Total Distinct SpielerID)

segerchr
Contributor III
Contributor III
Author

My exprected result is: 23

The formel should only count SpielerIDs where not Urlaub=x

Thanks for answering.

swuehl
MVP
MVP

Well, I do get 22 with

=count({1<Art={'Training'},SpielerID =e({<Urlaub={'x'}>})>} SpielerID)

segerchr
Contributor III
Contributor III
Author

Hi,

thats right. 22 ist the correct answer.

Thanks for help.

I should learn the difference between -= and e.

BR CS

swuehl
MVP
MVP

segerchr
Contributor III
Contributor III
Author

Sorry but i have to ask again. When i multiple the appointments the chartlinie are similar.

My target is to show on:

15.02.2016 --> 22

16.02.2016 --> 21

18.02.2016 --> 23

The data further in percent.

swuehl
MVP
MVP

Du musst den richtigen Schüssel für die Set Analysis nehmen, ich habe mal einen im Skript erzeugt, aus TerminID und SpielerID

    AutoNumber(TerminID& SpielerID) as KEY

Dann

=count({1<Art={'Training'},KEY =e({<Urlaub={'x'}>})>} DISTINCT SpielerID)

segerchr
Contributor III
Contributor III
Author

Hi,

thanks a lot it works. But, can you explain it ?

Why do i need the key ? Because when i set the analysis on the SpielerID the SpielerID is not unique ?

segerchr
Contributor III
Contributor III
Author

Adopted, that i would also exclude verletzt=x and krank=x in the example.

How can I write that ?