Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
MZeldenthuis
Contributor II
Contributor II

Total in Pivot tabel

I have a tabel with Date/time that members enter our club to do a workout. (see print screen) And I made a pivot tabel with:

- Koloms per year-month

- Row per member and kind of membership

- value is number of workouts (per member, per membership, per year-month

That colom goes oke with : sum(numberofvisits)

nb: [numberofvisits] is the number 1 in the tabel I use.

 

Now I want a second value (espesialy a total) with the count of the unice members. So that I have a tabel where I see a total of workouts (for example 275 workouts that month) done by 90 members. And idealy also an avarage of (in this example) 3.05 workouts per member.

I can get a 1 (one) in the second value kolom (for example with: Sum(numberofvisits)/sum(sumberofvisists) or many other ways). But It will not total and/or avg.

I also tried somthing with [aggr] but I still don't understand that. I read a lot of post about aggr and alway's it looks like overkill and in 9 out of 10 tries I get nothing or error. The aggr function syntax is not getting to my mind I think. (and if I see the number of post on that, I'm not the only one)

 

1 Solution

Accepted Solutions
jensmunnichs
Creator III
Creator III

Add 2 expressions:

- Count(DISTINCT fullname)
- Sum(numberofvisits) / Count(DISTINCT fullname)

Think that should do it

View solution in original post

3 Replies
shiveshsingh
Master
Master

Can you share the sample data to work upon with expected o/p?

jensmunnichs
Creator III
Creator III

Add 2 expressions:

- Count(DISTINCT fullname)
- Sum(numberofvisits) / Count(DISTINCT fullname)

Think that should do it

View solution in original post

MZeldenthuis
Contributor II
Contributor II
Author

Tnx, that did the trick.