Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
youss123
Contributor III
Contributor III

Top 5 values in Stacked bar

Hi All,

Please help me out correcting my stacked bar chart,

I want to calculate for each of the each Agent, the Top 5 services based on the number of tickets they resolved.

  • Expression :  count( distinct {<Statut ={"Resolved"} >} [%Key - Ticket])
  • dimension 1: [Agent]
  • Dimension 2: [services] with dimension limitation to 5 

But the problem is that seem good but every time I select one agent the Top 5 change, the pourcentages change ... so it's not correct maybe I have to make a set analysis with  Sum( Aggr( If(Rank ...

( btw I filtered my graph on a perimeter because there are a lot of agents and I am afraid that it is not very readable)

Thanks,

Y

Labels (2)
3 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @youss123 , maybe you can omit the filter by Agent?

count( distinct {<Statut ={"Resolved"} , Agent>} [%Key - Ticket])

JG

youss123
Contributor III
Contributor III
Author

Hi, 

Thank you for your comment,

There is still a problem is that if for example if an agent contributes in only one service, normally the percentage should be 100%, here it is not, so I think the whole expression is wrong.

Y

JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @youss123, it is difficult to understand the details with no sample data. Maybe is something like:

count( distinct {<Statut ={"Resolved"} , Agent>} [%Key - Ticket]) / count( distinct {<Statut ={"Resolved"} , Agent>} TOTAL <Agent> [%Key - Ticket])

But it is just a try without understanding the real problem.

JG