8 Replies Latest reply: Dec 28, 2017 6:00 PM by Mikko Eriksson

# Qlik Sense conditional coloring based on highest values in column

Hello,

I would like to highlight the highest values in the columns of my pivot. (gradient from largest to smallest) How do i do that?

• ###### Re: Qlik Sense conditional coloring based on highest values in column

Hi Mikko,

Let's say your measure is called Sum(MeasureValue), and those numbers you have there from 1 to 29, let's call them RowID. And that you want the lowest in Red and the highest in Yellow,

Then you could use this formula on the colour expression (background or text)

=Colormix1(

(sum(MeasureValue)-\$(=min(aggr( sum(MeasureValue), RowID))))/

\$(=(max(aggr( sum(MeasureValue),RowID))-min(aggr( sum(MeasureValue),RowID)))),Red(),Yellow()

)

Cheers,

Luis

• ###### Re: Qlik Sense conditional coloring based on highest values in column

It'll look something like this:

I hope this helps,

Cheers,

Luis

• ###### Re: Qlik Sense conditional coloring based on highest values in column

Hi Mikko,

Have you been able to check it out?

Luis

• ###### Re: Qlik Sense conditional coloring based on highest values in column

Hello,

not working. the measure value is an aggregated one and the row is day(date).

And as you see i have multiple values in one column and i want to highlight the values within the columns (high to low in column)

thanks

• ###### Re: Qlik Sense conditional coloring based on highest values in column

Hi,

Can you share sample data and your aggregation formula to see if I can reproduce?

Luis

• ###### Re: Qlik Sense conditional coloring based on highest values in column

Hi Mikko, which one?

• ###### Re: Qlik Sense conditional coloring based on highest values in column

Hi Mikko,

Please let me know if you're still interested in solving this one. If so, please share sample data and the expressions you're using to calculate dimensions and measures so I can adapt the color expression

This is the expression I used for the second option (Comparing cell against column)

=Colormix1(

((sum(MeasureValue)-min(TOTAL <RowID> aggr(sum(MeasureValue),RowID,Date2)))

/ (max(TOTAL <RowID> aggr(sum(MeasureValue),RowID,Date2))

-min(TOTAL <RowID> aggr(sum(MeasureValue),RowID,Date2)))),White(),Green()

)

I hope this helps,

Cheers,

Luis

• ###### Re: Qlik Sense conditional coloring based on highest values in column

sorry, been busy. I will try out the latter option and let you know how it goes.