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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
BI101
Regular Visitor

Combine and display data based on a set range

Hi,

 

I would like to display sales data as # of quotes in a monetary bucket.

For example: 50 quotes in the range of 0-$50,000 or 20 quotes in the range of $50,000-100,000

I feel like a stacked bar chart could be good for this but i'm not sure how to combine the data into the ranges.

Any ideas?

 

Thanks!

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @BI101 

To create bins by sales sum you can add a  calculated column like :

Bins = if('Table'[Sales]>0 && 'Table'[Sales]<= 49999,"0-49,999",
if('Table'[Sales]>49999 && 'Table'[Sales]<= 100000,"50,000-99,999","100,000+"))
Ritaf1983_0-1700018548395.png

To sort the bins in the right order on visuals you can create a table with bins' names and sort order :

Ritaf1983_1-1700018712022.png

create a relationship between the tables :

Ritaf1983_2-1700018773847.png

Modify sort order :

Ritaf1983_3-1700018849815.png

 

create simple DAX for distinctount of quotes :

Quotes# = DISTINCTCOUNT('Table'[Quote id])
Put the data on the graph:
Ritaf1983_4-1700019015985.png

PBIX is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

4 REPLIES 4
Ritaf1983
Super User
Super User

Hi @BI101 

To create bins by sales sum you can add a  calculated column like :

Bins = if('Table'[Sales]>0 && 'Table'[Sales]<= 49999,"0-49,999",
if('Table'[Sales]>49999 && 'Table'[Sales]<= 100000,"50,000-99,999","100,000+"))
Ritaf1983_0-1700018548395.png

To sort the bins in the right order on visuals you can create a table with bins' names and sort order :

Ritaf1983_1-1700018712022.png

create a relationship between the tables :

Ritaf1983_2-1700018773847.png

Modify sort order :

Ritaf1983_3-1700018849815.png

 

create simple DAX for distinctount of quotes :

Quotes# = DISTINCTCOUNT('Table'[Quote id])
Put the data on the graph:
Ritaf1983_4-1700019015985.png

PBIX is attached

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

@Ritaf1983 

thanks for the help!

I'm able to do what you mentioned but for some reason my bins arnt sorting in the right order.

I can also group by and create a table with the qty of quotes per bin but either way i do it, my axis is out of order. Any suggestions for this?

Hi @BI101 
That is why I added a sort order column and a table :

Ritaf1983_0-1700108657029.png

You need it to sort the bins in the right order

Ritaf1983_1-1700108718546.png

And use the bins column from this "small" table on visuals 

Ritaf1983_2-1700109596239.png

More information about sorting by column:

https://www.techrepublic.com/article/how-to-sort-by-column-power-bi/

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks! for some reason i just restarted my powerbi and it worked 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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