11 Replies Latest reply: Apr 6, 2016 2:50 AM by Christian Seger

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

• Re: Set Analysis not equal

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)

• Re: Set Analysis not equal

My exprected result is: 23

The formel should only count SpielerIDs where not Urlaub=x

• Re: Set Analysis not equal

Well, I do get 22 with

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

• Re: Set Analysis not equal

Hi,

thats right. 22 ist the correct answer.

Thanks for help.

I should learn the difference between -= and e.

BR CS

• Re: Set Analysis not equal

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.

• Re: Set Analysis not equal

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)

• Re: Set Analysis not equal

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 ?

• Re: Set Analysis not equal

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

How can I write that ?

• Re: Set Analysis not equal

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)

• Re: Set Analysis not equal

Thanks so much. It works fine