Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Not applicable

select dynamic input for a graph

Hello All,

I have a table containing transaction data for multiple quarters (which can be identified by a transaction date associate with it). I want to create a graph comparing any 2 quarters in the data but I want to give user a choice to select the quarters to compare may be using radio buttons. How do I go about this? I couldn't find an example which will help me to implement such a functionality.

Thanks

1 Solution

Accepted Solutions

Re: select dynamic input for a graph

Does this look like something you are trying to do? (PFA)

Best,

Sunny

View solution in original post

16 Replies

Re: select dynamic input for a graph

What would be the dimension you would be comparing them on? is it going to be quarter or some other dimension like country, state, etc..

Best,

Sunny

Not applicable

Re: select dynamic input for a graph

my dimension will be product ID and one of the graphs will be comparing the sales per quarter another will be change in price.

Re: select dynamic input for a graph

You can try to employ the concept of alternate states. Take a peek at the attached sample.

Best,

Sunny

buzzy996
Honored Contributor II

Re: select dynamic input for a graph

try this way,sample attached.

u have to create 2 variables,

List box: Variable1--define listed values in list box(in ur case Q1,Q2,Q3,Q4)

List box: Variable2--define listed values in list box(in ur case Q1,Q2,Q3,Q4) (SAME VALUES)


use those variables in ur expressions,to render dynamic values from ur selections

Not applicable

Re: select dynamic input for a graph

Hi Siva,

thanks for this example, it is very close to what I want. Defining 2 variables and using them to change the input is something I was looking for! Now, I am trying a plot a graph for change in mVal by pVal as seen in attached example. i had the exact same graph before I started implementing the dynamic selection but for some reason I couldn't get this to work using the dynamic drop down for quarter selection. Any thoughts?

Re: select dynamic input for a graph

Does this look like something you are trying to do? (PFA)

Best,

Sunny

View solution in original post

buzzy996
Honored Contributor II

Re: select dynamic input for a graph

see attached and let us know,if u need any changes..,the problem with  expression,i just replaced sunny exp here.

Not applicable

Re: select dynamic input for a graph

Edi: NVM it worked!

Hi Sunny,

This worked perfectly! Now one more question for the calculated dimension -

=Sum({<Quarter = {'$(vQuarter1)'}>}MValue) - Sum({<Quarter = {'$(vQuarter2)'}>}MValue)

For the above expression can I add one more set expression (Year) as follows:

=Sum({<Quarter = {'$(vYear1)'}>}{<Quarter = {'$(vQuarter1)'}>}MValue) - Sum({<Quarter = {'$(vYear2)'}>}{<Quarter = {'$(vQuarter2)'}>}MValue)

Re: select dynamic input for a graph

How can Quarter be equal to year? What exactly are you trying to do? Would you be able to give an example?