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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Aroth
Advocate II
Advocate II

How to create a measure that calculate subtotal in order to aggregate in bucket size ?

Hi everyone , 

 

I want to aggretate the total sales of every customer in my data base by month,  and then bucketing the total sales by customer and month, by sales bucket size.


Step 1: SUBTOTAL by Month

If the same customer appears many times in one month => Create a measures that calculate the total sales of a customer by month
(I Need this to be a measure because the "total sales" is also a measure and has to be related to the inital data base. That's why I'm not using SUMMARIZE that create a new table)

 

Step 2 : Create Buckets

Then I want to classify the sales by bucket size :
IF (Total sales amount < 100 ; " less than 100"  
IF (101 < Total sales amount < 200; "between 100 and 200"
IF ( Total sales amount > 200 ; Greater than 200)

I you could help me at least for the first step it would be great. 

Thanks for your time, 

Al 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I recommend you follow this pattern on buckets/bins/segments: http://www.daxpatterns.com/dynamic-segmentation/

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

were you able to fix this? I am stuck in the same situation

Anonymous
Not applicable

I recommend you follow this pattern on buckets/bins/segments: http://www.daxpatterns.com/dynamic-segmentation/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors