Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have training data for users, in the following format
course title, user_id
When i create a table, i can easily show
Course Title, Total of users assigned to that course
But i'd also like to add a third column (% of total unique users assigned to that course)
So if i had 50 users, 10 on that course the data would read
Course A, 10, 20%
I'm trying to work out how to do this because qlik restricts the row data down to "course a" so not sure how to count outside that restriction to get the % ?
Thanks
@DMG can you share a sample data and the expected output ?
Hi,
=count(course)/50*100
Something like this
User, Course,
A, First Aid
B, First Aid
C, First Aid
A, Security
D, Security
So the expected response would be
Course, number of assigned users, percentage that number of assigned users is off the total users
First Aid, 3, 75%
Security, 2, 50%
As they are four users (A-D) and two courses
The course numbers and users can change, the idea is to be able to have a table that shows the course name, number of assigned users, and the percentage that number is of the total number of users (in this case 4).
Because qlik restricts the row data down as soon as the first column is Course, i'm not sure how to be able to access the total user value of 4 so i can work out the percentage of total users.
Thanks but that wont work as the number of users and courses can vary dynamically.
Hi,
Aggr(Count(course), course/Distinct (user)*100
Hi,
(Aggr(Count(course),course)/distinct (user))*100
Your denominator should use TOTAL. You don't need aggr.
Count(user_id) / Count(Total user_id).
FYI - if you need to set your aggregation to different levels you can do Total <field1, field2, fieldn> but in this case you only need the global total.
Hi,
Aggr(count(course),cou cou)/count(total distinct (user))*100
It gives requester result. Verified ok
ok good, but you shouldn't need the outer aggr().