Forum Discussion
glynwilks
3 years agoHelper I
Count Top N
Hello, I am using dyamic text to display the following. The below also shows that <Top Agent> has received the most positive responses from end users with a total of <Total Positive Responses> p...
- 3 years ago
Hi glynwilks
To achieve a goal I created 3 measures:1. Counter of positive responses :
PositiveCount =CALCULATE(COUNTROWS('table'),'Table'[Rating Name] = "Positive")2. Top 1 for aggent :Top agent =TOPN(1,ALL('table'[Agent]),[PositiveCount],DESC)3. "Filtered" counter that you can put on your text:Top1PositiveCount =CALCULATE([PositiveCount], -- Your previously created PositiveCount measureTOPN(1, ALL('table'[Agent]), [PositiveCount], DESC))+ Text measure :Top agent text = "Top agent is " & [Top agent] & "He has " & [Top1PositiveCount] & " positive responses"Result :
Ritaf1983
3 years agoSuper User
Hi glynwilks
To achieve a goal I created 3 measures:
1. Counter of positive responses :
PositiveCount =
CALCULATE(
COUNTROWS('table'),
'Table'[Rating Name] = "Positive"
)
2. Top 1 for aggent :
Top agent =
TOPN(1,
ALL('table'[Agent]),
[PositiveCount],
DESC)
3. "Filtered" counter that you can put on your text:
Top1PositiveCount =
CALCULATE(
[PositiveCount], -- Your previously created PositiveCount measure
TOPN(1, ALL('table'[Agent]), [PositiveCount], DESC)
)
+ Text measure :
Top agent text = "Top agent is " & [Top agent] & "He has " & [Top1PositiveCount] & " positive responses"
Result :