Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression legend filtering issue

Hi everyone ,

In my chart I have one dimension and against it there are 2 expressions which are stacked over one another , when I click on legend of first expression then what I want is to show only that expression bar in chart and hide other one(as we have legends functionality when we have 2 dimensions and 1 expression), Is there any workaround to do this???

Regards:

Mubbasher

9 Replies
vikasmahajan

Select Second Dimension -> Untick -> Show Legend Option

hope this is resolve.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
michael_maeuser
Partner Ambassador
Partner Ambassador

for each expression you can add a condition:

e.g. your 2 expressions:

sum(a)

sum(b)

condition for expression a:

getselectedcount(b)=0

condition for expression b:

getselectedcount(a)=0

Not applicable
Author

Hi Michael ,

My two expresssion are

Sum(Cost)

Avg(Cost)

this chart have only 1 dimension i.e. Product

there are two legends

Red=Sum(Cost)

Green=Avg(cost)

So what I want when i click over Red legend in chart it should only show Red Bar and in legends only red legend.

rajeshvaswani77
Specialist III
Specialist III

Would Dimension that is a drill down group in your case help?

Looks like thats what you are looking for.

thanks,

Rajesh Vaswani

Not applicable
Author

No I only have one dimension so no need of a group dimension.

tresesco
MVP
MVP

You can groug the expressions too in expression tab.

Not applicable
Author

I know but in my case user should be able to view both expressions at the same time , in case if he want to view any of one then he can click over its legend to view only that expression.

tresesco
MVP
MVP

No direct option I can suggest you. Workaround could be like: try with three buttons(Both, Expr1, Expr2) and conditional enablement of the expressions. Could that be an option?

Not applicable
Author

That can be an option , but as in another chart I have 10 expressions , for those there will be hiding legend and positioning legends will be a problem.