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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
Anonymous
Not applicable

Put orders into buckets based on total sales

Is it possible to count how many orders are in different ranges ( 1-49, 50-59, 60-69, etc.)? I have a sales table that has mutple lines per order so it would need to sum up each order based on order number.

 

1 ACCEPTED SOLUTION

Hi,

 

You may download my PBI file from here.  This uses 2 calculated columns and therefore will not work with filters/slicers.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

Yes, sample data would help and it might be as simple as a column formula that employs SUMX/COUNTX, FILTER, ALL and EARLIER. Tough to say exactly. For something a little more complex: https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-ABC-Classification/m-p/479146


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I think the process would be go sum each order using the order number coloumn then counting how many are within a range of dollars. Then repeat that for each bucket.

 

here is a sample file: https://www.dropbox.com/s/9vqui3xkhd21yt1/sample.xlsx?dl=0

 

Hi,

 

You may download my PBI file from here.  This uses 2 calculated columns and therefore will not work with filters/slicers.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Works great! Thanks 

ryan_mayu
Super User
Super User

@Anonymous

 

I create a new table to sum up the order number.

 

Table 4 = SUMMARIZE('Sheet21',Sheet21[order],"Number",COUNT(Sheet21[order]))
Then create a column to assign the orders to corresponding range.
 
range = SWITCH(TRUE(),'Table 4'[Number]<3,"1-3",'Table 4'[Number]<5,"3-5",'Table 4'[Number]<10,"5-10",'Table 4'[Number]<20,"10-20")
c1.JPG
 
 
Please let me know if I understand your request correclty.Thanks
 
 
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.