Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
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 (2)
1 Solution

Accepted Solutions
Contributor III
Contributor III

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
Master II
Master II

Maybe this:

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

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?

Master II
Master II

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

formula_color.pngtabla_color.png

Contributor III
Contributor III

I've added an xlsx, just in case.

Thnks

Contributor III
Contributor III

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

Master II
Master II

try this:

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

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.