Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Please help regarding below example..

Hey,

Let say i have an input box and i entered a year. According to that year i want the sum of salary.

How can i achieve this ??

How to put input box where user can input value and how to get sum of salary according to inputed value ??

Can anyone help??

Thanks

1 Solution

Accepted Solutions
khalander
Creator II
Creator II

Hi,

Create one empty variable like below screenshot

varible.png

Then create new Input box and add that empty variable like below.

INPT.png

Then add expression as Sum({<Year={$(vInputYear)} >} Value) like below image.

Chart_exp.png

After that enter year in input box it will effect in chart also because we have given that variable in that chart also.

Regards,

khalander

View solution in original post

17 Replies
Anonymous
Not applicable

you Need to define a variable "vInputYear"

and in your table, Chart you have to use set analysis

sum({<MyYear={'$(=vInputYear)'}>}Dact)

nikhilgarg
Specialist II
Specialist II
Author

Hey,

Thanks i got your point but can you tell me how to create an input box with label say(Input year) and then how to map this value with variable created say "vInputYear" ??

Thanks

senpradip007
Specialist III
Specialist III

PFA. Hope it will help you.

nikhilgarg
Specialist II
Specialist II
Author

HEy,

I am using trial version of qlikview so cannnot open your document . So can you kindly tell me here how to acheive what i want ...

Thanks

flipside
Partner - Specialist II
Partner - Specialist II

An alternative way you could consider is loading your year values as a separate field in an island table, e.g...

Data:

Load * inline [
Year, Val
1990, 23
1990, 24
1991, 2
1992, 32
1992, -3
1992, 0.5
]
;

YearSelects:
Load distinct Year as sYear resident Data;

Then you can have a listbox or multibox for users to select the year (remembering to set the One Selected Value setting) and display the sum of Val (in my example) by using ...

=sum({<Year={'$(#=sYear)'}>} Val)

This saves on having a variable and the user can only select valid values.

flipside


Anonymous
Not applicable

i attach you a test qvw

senpradip007
Specialist III
Specialist III

In the input box property go to General tab ----> Select variable named vInputYear ----> same is showing in the Label ----> edit vInputYear as Input Year.

svsudhakar
Creator
Creator

Hi nikil,

create one  new Sheet  Object "Input Box" and -->Clik New Variable and named it as "vInputYear" -->

Click ok and write the sum({<MyYear={'$(=vInputYear)'}>}Dact)

nikhilgarg
Specialist II
Specialist II
Author

HEy,

I am using trial version of qlikview so cannnot open your attached file . So can you kindly tell me here how to acheive what i want ...

Thanks