Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

How can I do this example of Calculation Condition in the Line Chart?

Hi all,

I have the following example of a Line Chart in QlikView:

The two lines represent a Yes or No trend based on two expressions.

I want to put a calculation in each of these expressions so that when a user selects Yes in a List Box it shows just that line. Or if they select No it only shows that line. Or if they select both Yes and No in the List Box it should show both lines.

Does anyone know how I can implement something like this?

The Yes/No values in a List Box are independent of the expressions (i.e. they are not actually used in the expression).

Please share your thoughts

5 Replies
MK_QSL
MVP
MVP

Can you provide the relation of Yes/No with these expressions?

You can have Conditional Show of both Expression

Considering your FieldName of Yes/No is YN

Expression Tab

For 1st Expression

GetFieldSelections(YN)='YES'

For 2nd Expression

GetFieldSelections(YN)='NO'

swuehl
MVP
MVP

Have you considered using conditional expressions?

Something like

=index(Concat(YesNoListBoxField),'Y')

resp.

=index(Concat(YesNoListBoxField),'N')


assuming a list box showing Yes / No values.

jblomqvist
Specialist
Specialist
Author

Hi Manish,

I tried to do exactly this but I get "All expressions disabled" message when I select both Yes and No in the List Box.

It works when I have one value selected but not both.

Any ideas how to show both values in the graph?

jblomqvist
Specialist
Specialist
Author

Hi swuehl,

Would this be applied to each of the expression using the Conditional option above the Expression field?

swuehl
MVP
MVP

Yes, these should be used as conditional expressions.