To do this, you are going to need to use the parameter tool. In your Measures field, right click and choose create -> Parameter. You can label it whatever you'd like (e.g. 'Top Customers') and choose how many how many customers you would like to filter by. For example, if there's 100 customers, you would choose your range to be from 1 to 100. Data type should be 'integer' and Allowable values can be 'All.' I would also suggest that you right click the parameter you've created on the bottom left and choose to 'Show Parameter Control.' This will allow your parameter to be visible on the right side of the worksheet.
Next, you will need to drag the Customers measure field to the Filters section. Right click and Edit Filter. On the tabs at the top, choose Top and click By Field. Fill out the information below to be Top and then choose your parameter (e.g. 'Top Customers') by Sales. Click Ok.
This should allow you to now choose the top N customers (i.e. top 10 customers by total sales).
Hope this helps!
I made TOp N customers. but i want to create this calc %
Top 50 Customers accounted for 53% of all sales in October 2016
1 of 1 people found this helpful
To get the number purely,
[Top 50 %]
window_sum(sum(if [Top 50] then ([Sales]) end))/ window_sum(sum([Sales]))
For further deital, please attach packaged workbook (***.twbx)
Assuming the number of items are always more than "N", you an follow this approach.
DATEPART('year', [Order Date])*100 + DATEPART('month', [Order Date])
[Top 50 % by month]
[Customer Name + Month]