Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
MWiciok
Creator
Creator

Color fractiles of Chart

Hello everybody,

I got the following problem: I have got a chart showing the number of invoices of each user. Now I want to color the 20% of the users in a different color. I got something like this:

Dimension:      user_name

Expression:     count(invoice_number)

Backgroundcolor Expression:     if(count(if(user_name = user_name, invoice_number, 0)) > fractile(aggr(count(invoice_number), user_name), 0.8), color1, color2)

I always got color2

it works if I change the fractile expression by a single number (i.e. 10).

But I want to get the boarder dynamically.

Can you help me?

1 Solution

Accepted Solutions
tresesco
MVP
MVP

See attached sample. I have done for top 10% . You can modify accordingly.

View solution in original post

9 Replies
Not applicable

you can use this, may be cany help you;

regards!!!

Color.jpg

MWiciok
Creator
Creator
Author

I don't think so.

See the attachment.

I want A and B got diffrent color than the rest.

MWiciok
Creator
Creator
Author

Has nobody a solution to this problem?

c_gilbert
Creator II
Creator II

Are you just wanting 20% of the users to go a different colour? E.g. The top 20% users with the most invoices?

... Or the users who have a number of invoices that is over 20% of the total to be a different colour?

lironbaram
Partner - Master III
Partner - Master III

have a look at the attach example

MWiciok
Creator
Creator
Author

It is the second. So, for example, there are 100 invoices in the system and I want to color the top 20%, then I need to color those bars of users, who got in sum more than 20 invoices. Person A got 15 invoices, person B 6, Person C 5 and the rest 1 invoice in their account. In this scenario I would like to color the bars of A and B.

MWiciok
Creator
Creator
Author

Hi Liron,

to be honest, I am not sure what you are calculating in your turn-around. I will try to understand your solution and will give Feedback.

tresesco
MVP
MVP

See attached sample. I have done for top 10% . You can modify accordingly.

MWiciok
Creator
Creator
Author

Thank you very much. I just have to modify the fractile-part and this will be.