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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Zeta
Contributor III
Contributor III

highlight highest and lowest value of a KPI in line diagram

Hi,

I would like to highlight the highest and lowest value point of a line like the sparkline mini chart in an table chart.

Does anyone have a solution?

Thx

Labels (4)
1 Solution

Accepted Solutions
MatheusC
Specialist II
Specialist II

It would be easier if you gave some sample data.
Assuming you have a measure sum(sales) and dimension X

Then you could enter the following expression in the Color and Legend tab:

MatheusC_0-1728045219524.png


pick(match(
Sum(Sales),
max(total aggr(sum(Sales),[DimensionX])),
min(total aggr(sum(Sales),[DimensionX])))+1,blue(),LightGreen(),lightred())



-Regards, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!

View solution in original post

4 Replies
VBD
Partner - Creator II
Partner - Creator II

Hello, 

You have this options when you select "Colors" :

 

VBD_0-1728034173231.png

Regards,

Valentin Billaud
Next Decision
Zeta
Contributor III
Contributor III
Author

Thanks, but that is the option in the table chart. I would like to assign a color to the highest and lowest points in a line chart, similar to the sparkline.

How can I do this in the line chart?

VBD
Partner - Creator II
Partner - Creator II

Ok sorry,

I think the best way to do that it's with a reference line, one for the max with an expression like.

=max(total aggr(Sum(Expression1),Year))

But you have a line.

An other option is to create,  an other mesure, in your master item, like 

if(max(total aggr(Sum(Expression1),Year))=Sum(Expression1),max(total aggr(Sum(Expression1),Year))

you define a color and you use this measure in your line chart : 

VBD_0-1728042671630.pngVBD_1-1728042737978.png

and you do the same thing for the minimum, but this option will degrade the performance.

 

Regards

Valentin Billaud
Next Decision
MatheusC
Specialist II
Specialist II

It would be easier if you gave some sample data.
Assuming you have a measure sum(sales) and dimension X

Then you could enter the following expression in the Color and Legend tab:

MatheusC_0-1728045219524.png


pick(match(
Sum(Sales),
max(total aggr(sum(Sales),[DimensionX])),
min(total aggr(sum(Sales),[DimensionX])))+1,blue(),LightGreen(),lightred())



-Regards, Matheus

Did you find a solution to your question? Mark the solution as accepted and if you found it useful, press the like button!