Forum Discussion
Order buckets using Analysis Services
- 6 years ago
Anonymous
I checked again and you can do this in this way:
Given this data structure:
you need to create a calculated table using this DAX code:
Customer Orders = SUMMARIZE( 'Table', 'Table'[SupplierID], "Count of Orders", COUNTROWS(VALUES('Table'[OrderID])) )You will receive calculations of how many orders each supplier had. Then we will create groups (buckets):
Buckets = SWITCH(TRUE(), 'Customer Orders'[Count of Orders] < 2, "<2", 'Customer Orders'[Count of Orders] >= 2 && 'Customer Orders'[Count of Orders] <= 5, "2-5", ">5")Thanks to this, you will get groups that you can use in the chart. Put Buckets on the x-axis, and add SupplierID as Value and change it to Count, or write measure for Count for Suppliet ID and put it in Value field.
If you have any problems, ask.
_______________
If I helped, please accept the solution and give kudos! 😀
Hi Anonymous
You cannot insert a measure in the x-axis field - it must be a regular column or a calculated column. Are count orders in the column or are you taking them as a measure?
You could send sample data for both tables. I will help you create a chart.
_______________
If I helped, please accept the solution and give kudos! 😀