Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using Variable Comparative Analysis


Hi All

Below is example of Alternate State, I am looking two things here

1. On State A(light blue) Gender is by default M should be selected and on State B(Green) Gender is by default F selected.

2. When Gender is M than I need Sum(Sales) in expression; when F than Sum(Commission) column required, if both selected than both

    columns required

3. How to incorporate variable and as column (please see variable vGender)

I have attached sample QV file..I appreciate your suggestion. Thanks

Capture.PNG

3 Replies
cspencer3
Creator II
Creator II

i dont see the vGender Variable.

But to accomplish tasks

1: Set a document trigger to select M in stateA and F in stateB

2:create expressions for sum(Sales) and sum(Commission) in both charts. Create conditional logic to show the columns you desire based on the logic you have created: Thus for the sum(sales) column, you would create the conditional: if(SubStringCount(GetFieldSelections(Gender,';',1,'StateA'),'M') = 1, 1, 0) and for sum(commission)

do if(SubStringCount(GetFieldSelections(Gender,';',1,'StateA'),'F') = 1, 1, 0); Thus if both are selected you get both, if one is selected you would only show one.

3: unsure what you mean.

Anonymous
Not applicable
Author

Hi Charles

GM!

Great helpful answer for top two.

The 3rd question is there anyway to evaluate StateA list box value to StateB

in attached QV let say if Gender='M' than Gender='F' should be there in StateB

Thanks for your time great help


Not applicable
Author

Have a look at this - the second post explains it in detail

http://community.qlik.com/thread/51147