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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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 II
Resolver II

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.