Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a Actual column and Target column for each person. I am providing a input box where user can enter the % value which is Actual/Target. Now based on the % value entered by the user in input box, I need to filter out the Persons for whom Actual/Target = %(entered in input box) in a variable.
Can anyone help me with this.
Thanks,
Niharika.
Some extra logic in an additional variable will help. Have a look at this. BTW you can exclude the vMatch variable from the Input Box. It will still work correctly.
Try creating a calculated dimension (e.g. a field expression in a list box), like
=Aggr( If( Only({1} Actual / Target) >= vVariable, Only({1}Person)), Person)
create a variable to capture the input of the user than in the expression use the variable like this
Add Actual & Target as the dimension and the expression
Expression 1 :
Name : value
Actual/Target
Add one more expression
Expression 2:
if( value = variable , value )
Go to >presentation tab and hide the first expression
Thanks everyone,
The solutions provided can be used for one particular chart. But I have 10 charts of different KPI's and all these 10 charts should show data of the person's whose Actual /Target is the value entered in input box. So I need the persons for whom the condition gets satisfied in a variable, which I can use for all the 10 charts in set analysis.
The set analysis might look like
=Sum( {<Person = {"=Actual / Target >= vVariable"}>} Value)
HI Swuehl,
Thanks for the response, but I am not getting any data when I keep the expression you have suggested.
Any other solution?
If you have more than one record per Person containing Actual and Target, we need to aggregate:
=Sum( {<Person = {"=Sum(Actual) / Sum(Target) >= vVariable"}>} Value)
vVariable is the variable that holds the percentage threshold. There need to be persons that fulfill the requirement, of course.
Hi All,
Let me put my requirement in a more clear way. I have 2 tables as
Table1:
Person | Year | Actual | Target |
Person1 | 2015 | 80 | 86 |
Person2 | 2015 | 78 | 100 |
Person3 | 2015 | 37 | 54 |
Person4 | 2015 | 88 | 150 |
Person5 | 2015 | 58 | 60 |
Person1 | 2016 | 60 | 80 |
Person2 | 2016 | 30 | 57 |
Person3 | 2016 | 65 | 90 |
Person4 | 2016 | 52 | 100 |
Person5 | 2016 | 75 | 100 |
and Table2:
Person | Year | Qty |
Person1 | 2015 | 47 |
Person2 | 2015 | 22 |
Person3 | 2015 | 20 |
Person4 | 2015 | 33 |
Person5 | 2015 | 16 |
Person1 | 2016 | 35 |
Person2 | 2016 | 44 |
Person3 | 2016 | 44 |
Person4 | 2016 | 38 |
Person5 | 2016 | 12 |
Now in Qlikview, I will give an input where user can give a value and there are two different charts one showing Actuals and the other showing Qty.
Suppose when user enters 75 in input box, in both the charts(showing Actuals and Qty), the details of only those persons for whom (Actual/Dropped)*100=75 should be shown.
Similarly there would be totally 10 different charts where the same compression should happen.
The expession to use goes like this:
Sum( { < %Key = { "=Actual/Target=$(vPercent)/100" } > } Actual )
Have a look at this which is a screenshot of the included QVW example application:
To be sure that you hit the right interval you should do a Round()-function since the division might not be totally accurate.