Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.


Set analysis - Get the average over all Teammember

HI! 🙂

I need a help with ma set analysis:

What i want is, that i want from all Teammembers the average of there sale. 

I have a table where i have the teammember, calenderWeek, Win, Loose.

I want the average from win / (win+loose).

The average over all teammeber i calcualte with the following statement:

(((count({$<[KW]={"<=$(=Getfieldselections(CW)) >=$(vCWTD)"}>} Win))
(count({$<[KW]={"<=$(=Getfieldselections(CW)) >=$(vCWTD)"}>} Loose))
+((count({$<[KW]={"<=$(=Getfieldselections(CW)) >=$(vCWTD)"}>} Win)))

The Variable vCWTD calculates for me 12 weeks back depend on the selected CalenderWeek - for example if 201920 is selected vCWTD would be 201908.

In a diagram i have the average of there sale calcuted with the following expression:

(count({$<[KW]={"<=$(=Getfieldselections(CW)) >=$(vCWTD)"}>} Win))
(count({$<[KW]={"<=$(=Getfieldselections(CW)) >=$(vCWTD)"}>} Loose))
+((count({$<[KW]={"<=$(=Getfieldselections(CW)) >=$(vCWTD)"}>} Win)))

The dimension is this chart is the CalenderWeek (CW).


Now what i want is, i want to know the average per teammemeber - but i dont know how i can get it.


Thanks in advance for your help. 🙂



1 Reply
New Contributor III

Re: Set analysis - Get the average over all Teammember


Do you have a qv example to upload here?