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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.