Forum Discussion
hill
5 years agoHelper I
Exclude specific values from top n
Hi all, I want to calculate the sales of top 5 companies as % of total, alll things worked well, but I found I have name "Others" as a company name. I want to exclude it from the top 5 companies, so...
- 5 years ago
hill , Try to create a measure like this and rank/TOPN on that
new sales =calculate([Sales], filter(data, data[companyname] <> "Others"))
- 5 years ago
Please try this expression instead.
Top 5 Concentration =
DIVIDE (
CALCULATE (
[Sales],
TOPN (
5,
FILTER (
VALUES ( data[companyname] ),
data[companyname] <> "Others"
),
[Sales], DESC
)
),
CALCULATE (
[Sales],
ALLSELECTED ( data[companyname] )
)
)Regards,
Pat
amitchandak
5 years agoSuper User
hill , Try to create a measure like this and rank/TOPN on that
new sales =calculate([Sales], filter(data, data[companyname] <> "Others"))
hill
5 years agoHelper I
Thank you very much! it works for me