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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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