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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
amcgrail
Frequent 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 3
pbiuseruk
Resolver IV
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.

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.

Did you do this as a measure or a column and could you share a screenshot?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.