Forum Discussion
amcgrail
1 year agoFrequent Visitor
Grouping Users by Custom Bucket, Date Not Working
Hi,
I'm trying to group users by custom buckets based on their productivity of records worked. I'm able to get the calculation to work when looking at the dataset as a whole. When I drill down to a specific date I see users that aren't supposed to fall into certain buckets (ie user A with 100 records in bucket 100,001+). Is there a way to adjust the calculation to help with filtering dates so that the users fall into the appropriate category? Here is the formula being used currently. Thank you!
User Productivity Bucket =
VAR RowUserName = Productivity[UserName]
VAR TotalRecords = CALCULATE(sum(Productivity[Records]), FILTER(Productivity, [UserName] = RowUserName))
RETURN
SWITCH(true(),
TotalRecords<=0, "(0) Void Posting",
AND(TotalRecords >= 0,TotalRecords <= 100), "(1) 1-100 Records",
AND(TotalRecords >= 101, TotalRecords <= 1000), "(2) 101-1,000 Records",
AND(TotalRecords >= 1001, TotalRecords <= 10000), "(3) 1,001-10,000 Records",
AND(TotalRecords >= 10001, TotalRecords <= 100000), "(4) 10,001-100,000 Records",
TotalRecords >= 100001, "(5) 100,001+ Records")
3 Replies
- pbiuseruk
Resolver IV
Hi,
Just as a first glance - not sure why you've got the filter function in the calculate as you don't need it.
It would be useful if you could show a screenshot of the initial visual and the drilled down visual where the issue is.- amcgrailFrequent Visitor
The users will have different numbers of records worked on different days, so without it the calculation wouldn't work based on how the dataset is configured. At least not any way I've figured out how to.
- pbiuseruk
Resolver IV
Did you do this as a measure or a column and could you share a screenshot?