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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Nemo1
Creator II
Creator II

How to mark specific points in a line chart?

Hello, 

 

so i have a line chart, where i should sales and stores.... there are over 200 stores.

I deleted the labels of the x axis, but I would just like to mark some specific points, let say, that i would like to mark the first 15 stores as a, the following 45 as b and then c... they are sorted according to the sum of sales... how could i do that?

 

thanks

Labels (4)
3 Replies
anat
Master
Master

If(aggr(rank(sum(sal) , store)<=15, a, 

If(aggr(rank(sum(sal) , store) >15 and aggr(rank(sum(sal) , store) <=45, b, c)) 

 

Nemo1
Creator II
Creator II
Author

but where do i write that formula?

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Nemo1 

I'm not quite following what you are aiming for here. You say it is a line chart, but you are showing stores? Line charts should only be used when you have a continuous numeric dimension, such as date.

Your best bet for marking values on a chart is probably to use the Colour property, under the Appearance menu, with an expression something like:

if(rank(TOTAL sum(Sales),2,1)/count(TOTAL DISTINCT StoreNo) <= 0.1, rgb(180,0,0),
if(rank(TOTAL sum(Sales),2,1)/count(TOTAL DISTINCT StoreNo) <= 0.3, rgb(0,180,0), rgb(0,0,180)))

That is assuming the categorization is as per your other ticket? If not, remove the division and compare the rank values to 15 and 45 accordingly.

 

stevedark_0-1708331734840.png

Hope that helps.

Steve