Forum Discussion
Noexicaise
6 years agoFrequent Visitor
Count Text Occurence
Hello, I'm trying to get the top 10 occurrences of a column (see below) Table The format is text. Ideally, I would like to get the following result: Result In this example, La...
- 6 years ago
Hi Noexicaise ,
For your issue, maybe you can do like this:
//create a column in the original table; the Sales[Brand]field is the counted column Number = CALCULATE( COUNT(Sales[Brand]), ALLEXCEPT( Sales, Sales[Brand] ) ) // return the count table Count_occurence = TOPN( 10, DISTINCT(Sales), Sales[Number], ASC )Best Regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lionel-msft
6 years agoCommunity Support
Hi Noexicaise ,
For your issue, maybe you can do like this:
//create a column in the original table; the Sales[Brand]field is the counted column
Number =
CALCULATE(
COUNT(Sales[Brand]),
ALLEXCEPT(
Sales, Sales[Brand]
)
)
// return the count table
Count_occurence =
TOPN(
10,
DISTINCT(Sales),
Sales[Number],
ASC
)
Best Regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.