Forum Discussion
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> positive responses.
I can calculate top 1 agent with most positive feedback as
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 :
8 Replies
- Ritaf1983Super User
Hi glynwilks
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- glynwilksHelper I
Thanks and sorry about that.
So basically this is my first calculation to calculcate which one of my technicians has the most reviews from clients.
Top Rated Agent = TOPN(1,ALLNOBLANKROW(Smileback[ticket.agents]),[Total SmileBack Reviews])I then want to create a measure that will count the number of reviews and filter by the top rated agent. So, when I use the dynamic text, I can say the top rated agent is <Agent Name> and they had <Number> of reviews.- Ritaf1983Super User
As I mentioned please share some data tables to work with.