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
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
Super User
Super User

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!:
Power BI Cookbook Third Edition (Color)

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
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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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