Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
asalamun
Contributor
Contributor

Counting aggregate sums

I have a list of requests and each one includes the user id, I'm trying to create a bar chart to show the number of users that have made 4 or more requests in a given monthYear.

I already have the month year field from Master calendar, but I'm just having trouble getting the sum of counts.

 

Labels (5)
4 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

should be something like 

sum(aggr(if (count(RequestID)>3,1,0),userId,monthYear))

asalamun
Contributor
Contributor
Author

That doesn't seem to work, 

These are the results it gives me.

snip1.PNG

But the numbers should be like this

Jan-2019                0

Feb-2019                3

Mar-2019                4

Apr-2019                 4 

May-2019                4

Jun-2019                 0

 

lironbaram
Partner - Master III
Partner - Master III

hi

it's hard to know the problem , with out data

can you share sample data?

Brett_Bleess
Former Employee
Former Employee

Not sure if you sorted things out or not, so just in case not, and you cannot post any data, I wanted to drop the following Design Blog link out here for you, there are some additional links at the bottom of the post, just FYI, hopefully this will get you what you need if you are still struggling.

https://community.qlik.com/t5/Qlik-Design-Blog/Pitfalls-of-the-Aggr-function/ba-p/1463275

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.