Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

color by average

(Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75))

the above is an expression that works.

I am now trying to color by average of this column the text color.

For a color expression, how do i tell qlik to color anything above average as green and anything below average as red.

thanks!

1 Solution

Accepted Solutions
OmarBenSalem
Partner - Champion II
Partner - Champion II

what the dimension you're using in the chart where u're using this chart?

Let's say it called MyDimension:

in this chart, under adds on, create a reference line as follow( to test if we're doing things well?)

Avg(All aggr((Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75)),MyDimension))



and as an expression color:

if((Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75))

>= Avg(All aggr((Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75)),MyDimension))

, green(), red())



per analogy to my data, the resutlt would be:

Capture.PNG

View solution in original post

2 Replies
OmarBenSalem
Partner - Champion II
Partner - Champion II

what the dimension you're using in the chart where u're using this chart?

Let's say it called MyDimension:

in this chart, under adds on, create a reference line as follow( to test if we're doing things well?)

Avg(All aggr((Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75)),MyDimension))



and as an expression color:

if((Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75))

>= Avg(All aggr((Count(distinct([CREATED_DT.autoCalendar.Date]))/((Count({<supervisor=>}TOTAL distinct([CREATED_DT.autoCalendar.Date])))*.75)),MyDimension))

, green(), red())



per analogy to my data, the resutlt would be:

Capture.PNG

Anonymous
Not applicable
Author

That worked, thank you.