Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
manpri7078
Creator
Creator

Variables in Set Analysis

Dear All,

I want one help. I am attaching sample QVW file as well as sample excel file for this purpose.

In the qlikview document first text box is showing quantity for the month and FY in selection as correct.

Now I have defined three variables and created three input boxes for them and have selected the three desired values in those three input boxes. Now I am trying to use those variables in set analysis expression in second text box. I want the result to come to 61500 as can be seen from the sample excel file example, the row which I have marked as yellow Row No 34. I want to know what wrong I am doing in defining set analysis expression. The second text box is independent of any selection in the list boxes there.

Hope I have clarified in my qlikview document what I want.

Regards,

Manish Prasad

16 Replies
prma7799
Master III
Master III

When I select 2017 then its come.

selection.png

manpri7078
Creator
Creator
Author

I don't want to select 2017 in the list box. I want the second text box to show that figure and it should be independent of the selections in the two list boxes attached. For that purpose only I have created three input boxes with three different variables where user can select his desired values.

The selection is the list box is for the remaining objects in the whole document. I want only the second text box to calculate according to the three variables.

Hope I am clear in my query now.

Regards

Manish Prasad

sujeetsingh
Master III
Master III

First of all you can use this link to get the way of how to use variables in set nalysis.

Set Analysis with variables

Now  to remove selection (or make independent of selection add Field=   in set analysis expression.

manpri7078
Creator
Creator
Author

I am adding field= in my set analysis expression in my second text box. Just want to know what I am doing wrong.

My set analysis expression is Sum({<Period=,[Mon-Y]={'$(vInputMonth)'},Item_Grouping={'$(vInputExpense)'},Unit={'$(vInputUnit)'},Product={'Hydrate'}>}Actual_Qty)

What is wrong here ?

prma7799
Master III
Master III

Please change your [Mon-Y] date format  in MMM-YY and try it will work

prma7799
Master III
Master III

PFA

Change input unit 1 to unit 2 in input box

manpri7078
Creator
Creator
Author

Your expression is calculating when any list box is not selected. But in my case these list boxes have selections which are being used in other objects. I want that keeping all the list boxes selected, the said text box to display 61400 which should be independent of any selections.

How to do it ?

Hope I am now more clear in my query.

Regards,

Manish Prasad

prma7799
Master III
Master III

Try this

=Sum({<Period=,FY=,[Mon-Y]={'$(vInputMonth)'}  ,Item_Grouping={'$(vInputExpense)'},Unit={'$(vInputUnit)'},Product={'Hydrate'}>}Actual_Qty)

manpri7078
Creator
Creator
Author

in this case also if list box of month is selected, then it is not calculating. There is something missing still.

Regards

Manish Prasad