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

How to filter months using Input Box?

Hi guys! I have to filter my chart into specific months as entered by the user on the input box. I have seen threads about input boxes byt I can't seem to tailor-fit the expressions with my own work.

1.PNG

What I want to do is have an input box and type in a certain month, then the chart displays the data of that month. I wouldn't also want to limit the number of months typed into the input box with only just one month but say 3 months, then all the data of those three months gets displayed on the chart.

Please help me on this and sorry if i have missed something obvious.

Thanks!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Got it through this expression:

=Sum({<Month={$(vMonth)},[Day Name]-={'Saturday','Sunday'}>}Sales)

View solution in original post

7 Replies
suepenick
Creator
Creator

Make a list box with the Months - let them select by dragging and dropping or CTRL + Clicking to select random ones.

This is a very flexible solution as you may want to look at certain months this year over a year or year over year.

in your list box - you can select expression instead of just a dimension and do a =Year &'-'&Month

then they can randomly select months and years to compare -

or drag and see a group of months in a quarter/ what ever

input boxes are for large amounts of ranges of numbers - like from invoice number to invoice number or a very specific date range.   Search for Input Boxes in the community to see how to specifically set up the variables and event triggers.

http://www.bi-tv.com/how-to-add-start-date-and-end-date-calendar-objects-in-qlikview/

I watched a video to understand input boxes

MarcoWedel

why would anyone want to type a value he could easily select from a list box having only 12 values?

Anonymous
Not applicable
Author

Hi Sue! Thanks for your advice but the exercise I am doing now requires the use of Input Box specifically so I can't use List Box for now. The link seems to be broken as well but I sure am going to read on Input Box here at the community. Thanks!

Anonymous
Not applicable
Author

It's an exercise to get familiar with the Input Box object

fspinelli
Partner - Contributor II
Partner - Contributor II

Hi Kat,

for the input box I use this extension Qlik Branch

In the expression of your chart you can try this:

Sum(if(vMonth = month(yourDate), do expr true, do expr false))

vMonth is the name of the input box varable, I set this variable in the main script with Let vMonth = 0


Bye

Anonymous
Not applicable
Author

Got it through this expression:

=Sum({<Month={$(vMonth)},[Day Name]-={'Saturday','Sunday'}>}Sales)

Anonymous
Not applicable
Author

Thanks for the advice Sir. I was able to resolve it after all using this expression =Sum({<Month={$(vMonth)},[Day Name]-={'Saturday','Sunday'}>}Sales).