Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Highlighted
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
Esteemed Contributor

Re: Expression legend filtering issue

Select Second Dimension -> Untick -> Show Legend Option

hope this is resolve.

Vikas

michael_maeuser
Contributor III

Re: Expression legend filtering issue

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

Re: Expression legend filtering issue

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
Valued Contributor III

Re: Expression legend filtering issue

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

Re: Expression legend filtering issue

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

MVP
MVP

Re: Expression legend filtering issue

You can groug the expressions too in expression tab.

Not applicable

Re: Expression legend filtering issue

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.

MVP
MVP

Re: Expression legend filtering issue

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

Re: Expression legend filtering issue

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.