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: 
vbravomo
Contributor III
Contributor III

Color by expression

Hi guys,

Please I need you so much.

I have to créate a table with two columns: e-mail and calls (count(document))

And I have to put colors to  calls > avg (calls).

I've used this code, but it doesn't work. It returns the same color in all rows

if(count(Document)<avg(aggr(count(Document),[email])),blue(),red())

Thanks 🙂

Labels (1)
1 Solution

Accepted Solutions
vbravomo
Contributor III
Contributor III
Author

Thank you.

It Works! The new code is:

if(count(Documento)<(avg(Total aggr(count(Documento),[Correo electrónico]))),blue(),green())

View solution in original post

8 Replies
Frank_Hartmann
Master II
Master II

Maybe this:

if(aggr(count(Document),[email])<avg(aggr(count(Document),[email])),blue(),red())
vbravomo
Contributor III
Contributor III
Author

Thanks, but it doesn't work. It returns me one color in all raws.

I really don't need the email, but the aggr needs a dimensión.

Should I create a count(document) value  in the script?

Frank_Hartmann
Master II
Master II

can uyou share a sample qvw which demonstrates the issue?
vbravomo
Contributor III
Contributor III
Author

formula_color.pngtabla_color.png

vbravomo
Contributor III
Contributor III
Author

I've added an xlsx, just in case.

Thnks

vbravomo
Contributor III
Contributor III
Author

Thank you.

It Works! The new code is:

if(count(Documento)<(avg(Total aggr(count(Documento),[Correo electrónico]))),blue(),green())

Frank_Hartmann
Master II
Master II

try this:

If(count(Documento)<avg(Total aggr(count( Documento),[Correo electrónico])),blue(),red())
WilsonMadureira
Partner - Contributor II
Partner - Contributor II

No KPI quando meto um numero nesta parte eu escolho meter um Titulo. Nesta parte poderei escolher a cor em vermelho como titulo?

Porque consigo por apenas em cinzento.