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

    Color fractiles of Chart

    Matthias Wiciok

      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?