Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I am very new to using qlik so please bare with me.
I am trying to show both, in my example, the top five sales people and bottom five sales people based on their sales, in the same chart.
I understand I can show the top five values by using the limitations-function, but how can I show both the top-and bottom five values in the same chart?
Thanks!
Hello MBokan
How about you have 2 measures?
First is top 5 and secondary is bottom 5.
if you have 2 measures, the chart does not display zero dimensions.
Top 5 : Sum({<[Sales Rep Number] = {"=Rank(Sum(Sales))<=5"}>} Sales)
Bottom 5 : Sum({<[Sales Rep Number] = {"=Rank(-Sum(Sales))<=5"}>} Sales)
The presentation is Stacked bars.
Best Regard
Hanna.choi
You will need to use if like this:-
If(Rank(Sum(Sales)) < 6 or Rank(-Sum(Sales)) < 6, Sum(Sales),Null()
)
After that Uncheck Include Null values to get you answer.
(Please set you rank function and measure according to your requirement)
Thank you for your reply!
When I tried the if statement which you presented, all values which were between the top 5 and bottom 5 ended up being zero, and therefore there were more values in the bottom than there should be.
When I checked for the result manually, I could see that there are only five sales people which have zero sales.
Again, thank you for the reply!
Hello MBokan
How about you have 2 measures?
First is top 5 and secondary is bottom 5.
if you have 2 measures, the chart does not display zero dimensions.
Top 5 : Sum({<[Sales Rep Number] = {"=Rank(Sum(Sales))<=5"}>} Sales)
Bottom 5 : Sum({<[Sales Rep Number] = {"=Rank(-Sum(Sales))<=5"}>} Sales)
The presentation is Stacked bars.
Best Regard
Hanna.choi
Can you share a sample of your data?
also do you want the bottom 5 of those people who have done sales or does zero work?
you can try using Rank function
aggr(if(rank(sum(Revenue))<=10 or rank(-sum(Revenue))<=10,Customer),Customer)