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! 😀
unfortunately i do not think you will be able to do this in a live connection as you will need calculated columns for the buckets, dont think you can do that in a live connection. All the modelling is pushed to the SSAS model except for measures.