Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to make selected Line chart turn Green and the rest not selected turn Gray ?

Hi All

I try to do the recent blog post on line chart trick , which is very hot. I have follow the procedure , but i am not able to make it work. Hope some one can advise me.

In my next post i will post my QV doc.

Paul

1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

When I open your example and replace the expression with this:


sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"},GROUP_CLASS=>}sales/1000)

I get this result:

paulgreenline.png

Is this not the desired functionality?

View solution in original post

8 Replies
Not applicable
Author

Hi All

Enclosed my QV Doc.

Paul

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You just need to ignore the GROUP_CLASS field in your expression:

sum({$<year = {">=$(=max(year),4)"},SOURCE = {"TDSS"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"},GROUP_CLASS=>}sales/1000)

Hope that helps,

Steve

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

You may also want to sort on your second dimension to put the green lines on top of the grey ones.  Set the sort order to be by Expression and enter this as the expression:

=sum({$<year = {">=$(=max(year),4)"},SOURCE = {"TDSS"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}sales)

Set the sort order to be Ascending.

Not applicable
Author

Hi Sir

Thank you very much for your advise, i try the below it still not able to work.

I already modify the expression as below ( with out the GROUP_CLASS :-

sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}sales/1000)

Now i think the issue is cause by the below expression , which gray those line not selected :-

if(isnull(only($(ColumnDim101))) ,ARGB(100,200,200,200),ARGB(190,43, 123, 70))

which i need help.

Paul

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

The expression without the GROUP_CLASS is purely for the sort as you want the rows that are selected to show on top of the grey lines.  You need it with the GROUP_CLASS= for the expression.

Apologies for the confusion.

Not applicable
Author

Hi Steve

Now my issue is not on sort , my issue is when i select G1 , it will display G1 as green line , but all the gray line does not display. any idea ?

Paul

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

When I open your example and replace the expression with this:


sum({$<year = {">=$(=max(year),4)"}, month = {"<=$(=max({<year={$(=max(year))}>} month))"},GROUP_CLASS=>}sales/1000)

I get this result:

paulgreenline.png

Is this not the desired functionality?

Not applicable
Author

Hi Steve

Many thank , finally it working fine.

Paul