Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcement: Certain actions are currently causing a Page Not Found error. This is a known issue and we are working with the platform vendor to investigate and resolve it.
Highlighted
pranaview
Contributor

Hiding an expression on a Line chart based on a user selection on another chart

Hi Guys,

So , I have two charts 1)Stacked Bar 2) Line Chart. I have three expressions in the Line chart and I want to hide one of the them if the user selects something specific in the Bar Chart. I mean it's not just about selection in the bar chart, it is more about the selecting some specific dim values.

The bar chart is based on the Field1 which have four status in it for ex : Status1/Status2/Status3/Status4.

Now the expression that I want to hide simply shows the count of records which has Status3. So now what user wants is to hide this expression whenever any status is selected except Status3.

I'm fairly new to QV so I am not sure how can I achieve this. I need to come up with the solution quickly as this is an urgent requirement so any suggestion will be very helpful.

Thanks,

Pranav

 

 

6 Replies
Partner
Partner

Re: Hiding an expression on a Line chart based on a user selection on another chart

not sure if I understood your requirements completely
I achieved the following:
I select a Dimension in one Chart
I goto other Chart; one Expression is hidden
What I did:
Create a variable VTEST with if (match(Dimension,'Status1','Status2','Status4'),1,0)
and define your Expression with conditional layout =vTEST
Hope this helps, if not give more info

pranaview
Contributor

Re: Hiding an expression on a Line chart based on a user selection on another chart

HI @hrlinder,
Thanks for the suggestion.
So i tried the solution using variable creation but it did not work ( I directly addedit in Settings>Variable Overview with the definition that you have suggested and then went to the my Line chart expression and checked the conditional checkbox and added =vTest)

Then I just simply use the above expression as the condition with my expression code and it started working. But i'm still kinda confused cos the variable solution should have worked.

Thanks again for the help.
Pranav
Partner
Partner

Re: Hiding an expression on a Line chart based on a user selection on another chart

Hi

Within the expression tab, highlight the expression you want to hide conditionally.
Tick Conditional.
Add the expression
GetFieldSelections(DIM)<>'YourSelection'

Dim being the Dimension in question and YourSelection being the dimension value you want the expression to be hidden when selecting.

Mark
pranaview
Contributor

Re: Hiding an expression on a Line chart based on a user selection on another chart

Hi Mark,
Can I mention more than one dim values in 'YourSelection' ?
I tried something like this
GetFieldSelections(DIM)<> ('Selection1','Selection2','Selection3') and some other variation of this
but it did not work.

Pranav
pranaview
Contributor

Re: Hiding an expression on a Line chart based on a user selection on another chart

Hi @hrlinder

This solution only works when only one of the Status1 or Status2 or Status3 is selected. When I select any 2 of them together or all of them then this condition does not work.

Is there any way I can make it work for this scenario as well?

Thanks,
Pranav
pranaview
Contributor

Re: Hiding an expression on a Line chart based on a user selection on another chart

Nevermind!

I made it work using Pick and Match functions together and assigning a Status Flag to each status and using it in my conditional expression.