Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Re: select dynamic input for a graph

so the table has data worth multiple years and I want the user to be able to select any 2 quarters for comparison (i.e. any 2 quarters from any 2 years). So I have 4 drop-down input boxes containing pre definied  values of years and quarters. User can then select year and quarters respectively and the graph will update according to user's selection. Does that make sense?

Re: select dynamic input for a graph

Try this:

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

Not applicable

Re: select dynamic input for a graph

oh, that is exactly what I did but didn't realize I had quarter = year in the previous post, forgot to update that while posting!

Re: select dynamic input for a graph

Ya that should work in theory for a comparison such as:

Year = 2015 Quarter = Q1 vs Year=2014 Quarter= Q1 or

Year = 2015 Quarter = Q2 vs Year=2015 Quarter= Q1


If this is the kind of comparison you are looking for, then this should def. work.

Best,

Sunny

Not applicable

Re: select dynamic input for a graph

Set expression definitely worked here and I have slightly modified the code so that I have one field 'YearQuarter' instead of 2 fields year and quarter. So the updated set expression looks like this

=Sum({<YearQuarter= {'$(vYearQuarter1)'}>}MValue) - Sum({<Year = {'$(vYearQuarter2)'}>}MValue)


Now I want to include a filter (slider object) to filter values on X axis i.e. my slider should read min(above expression) to Max(above expression) but when I try to use min and max on the above expression I get garbage value error. Am I missing something here? Could someone please help me with this issue?

thanks!

Re: select dynamic input for a graph

I feel that since this is a new question that you are asking why don't you start a new thread with an example??? It would be probably easier for people to see the issue at hand and you can always give a link to this thread if they want to see more details.

Just a thought

Best,

Sunny

Not applicable

Re: select dynamic input for a graph

I am actually creating a new thread as well but wanted to post here since this thread has more background information.