Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

Not applicable

Coloring Text in Expression

Hi All,

I have a pivot table with one dimension as number and one expression as sum(amount).

I want to highlight value of sum(amount) as red for max value. I tried this through text color option in expression

and Visual Cues. But unable to find how to do.

Please anyone could help me on this?

Thanks,

Shailesh

1 Solution

Accepted Solutions
stigchel
Honored Contributor

Re: Coloring Text in Expression

Hi Shailesh,

Looks good, for the text color I think the problem is the reference to the expression. Let me explain,

In my example the

=if([Amount]=....,red()

is a reference to the expression label,, so in your case that would be

=if([Total Amount]=

or

=if(Column(1)=

9 Replies
stigchel
Honored Contributor

Re: Coloring Text in Expression

Hi Shailesh,

You are in the right direction, try getting the expression right for the text color option of the expression. I have made an example of what I think you want, see attached.

Not applicable

Re: Coloring Text in Expression

Hi Piet,

Thanks. I have done as u showed in example. I am able to get the max value by using aggr() function.

But when i am using the same function in text color with max function, the color is not coming.

Please find below snapshot of the same.

Capture.JPG

Regards,

Shailesh

stigchel
Honored Contributor

Re: Coloring Text in Expression

Hi Shailesh,

Looks good, for the text color I think the problem is the reference to the expression. Let me explain,

In my example the

=if([Amount]=....,red()

is a reference to the expression label,, so in your case that would be

=if([Total Amount]=

or

=if(Column(1)=

Not applicable

Re: Coloring Text in Expression

Hi Piet,


Thank you.. Its working now..



Regards,

Shailesh



Not applicable

Re: Coloring Text in Expression

Hi Piet,


There is one problem. The above thing is not coming for min. When i am trying to get color for minimum value,

it is showing as 0 for  minimum value.


Capture.JPG


What might be the problem where it is not showing minimum value?



Thanks,

Shailesh



stigchel
Honored Contributor

Re: Coloring Text in Expression

Your picture is not showing...

In my example replacing max with min works fine, so not sure what your problem is

Not applicable

Re: Coloring Text in Expression

Now u can see the picture.

I did same. Just replaced max with min, but its showing 0 as minimum value.

stigchel
Honored Contributor

Re: Coloring Text in Expression

You have zero values for Amount and/or Call Type, these are suppressed in the pivot table but included in the Min expression. Try like:

Min(TOTAL Aggr(Sum({<Amount={'>0'}>} Amount),[Call Type]))

Not applicable

Re: Coloring Text in Expression

Yes,

U are correct. Now its working fine .

Thanks,

Shailesh

Community Browser