Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
isabelleica
Contributor
Contributor

Compare class to average

Hello!

I've created a Simple Bar Chart with a dimension using the class function:

=class(Aggr(Sum([Hours]), [Person ID]), 10)

The expression is the amount of people:

=count(DISTINCT [Person ID])

I'm trying to colour the bar where the average of hours per person is found. I can find the average using the formula:

=Avg(Aggr(Sum([Hours]), [Person ID]))

How can I colour the class bar that contains the average?

I'm trying the following formula, but it is not working:

if(

    class(Aggr(Sum([Hours]), [Person ID]), 10)

    =

    class(Avg(Aggr(Sum([Hours]), [Person ID]), 10))

    ,

    Red(),

    Blue()

)

For example, in the image below, I would like to colour the 110-120 bar as Red (since it contains the average) and the others to remain Blue:

Captura de tela de 2018-09-26 09:54:55.png

0 Replies