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
PowerUser9311
Frequent Visitor

Filter based on ID, summing max values together based on bin.

I have a set of data with IDs having multiple entries. I would like to take the max value per ID, and base on another category (bin), determined by the value of that max value, I would like to group together all similar max values within that same bin and add them together, to do further calculations such as avg on them. I'm not sure if I could write a single measure for it or would need to break it up into multiple steps.

 

Example data:

ID with mult values per ID   /    Category to filter by

1   99                                          A

1   100                                        A

1   101                                        A

2    0                                           B

2    50                                         C

2    100                                       A

 

Base on data above, I want to take the max value from ID 1 (101) and add that to the max value from ID 2 (100), since they are both in the same category. 

I would ignore all the other values from ID 1 and 2, since they are not max values, and for the other categories (B, C, etc), I would ony want to add values within that bin only if they are the max value for their unique ID.

 

Help and tips is appreciated. TYIA

3 REPLIES 3
lbendlin
Super User
Super User

what are the bins and their boundaries?

In this sample data Bins are given A B C cetgory, but they could also be

0 - 49

50 - 99

100 - 149.

 

The below data (with slight change to 99 value) would match the bin range with the ABC category (but we only have to use one of these types of categories.) I'm mainly concerned with filtering based on several different conditions... TY

1   100                                        A

1   100                                        A

1   101                                        A

2    0                                           B

2    50                                         C

2    100                                       A

"would ony want to add values within that bin" 

 

sorry I missed that part.  What would be your expected outcome based on the sample data?

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.