9 Replies Latest reply: Apr 29, 2014 9:37 AM by Matthias Wiciok

# 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?

• ###### Re: Color fractiles of Chart

regards!!!

• ###### Re: Re: Color fractiles of Chart

I don't think so.

See the attachment.

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

• ###### Re: Re: Color fractiles of Chart

Has nobody a solution to this problem?

• ###### Re: Re: Re: Color fractiles of Chart

have a look at the attach example

• ###### Re: Re: Re: Color fractiles of Chart

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.

• ###### Re: Color fractiles of Chart

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?

• ###### Re: Re: Re: Color fractiles of Chart

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.

• ###### Re: Re: Re: Re: Color fractiles of Chart

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

• ###### Re: Re: Re: Re: Color fractiles of Chart

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