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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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