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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
aartiladdha
Microsoft Employee
Microsoft Employee

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors