Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to fixe a selection on loading

Hi,

I'm building a application that shows a list of years, for each year a button can open a QlikView application dedicated to this year. (I can't put all years in only one application, it's too big).

On each detailled application I have datas for one specific year and the previous year to compare values.

I build that detailled application by scripting and launch loading in command line with the wanted year as parameter.

My problem is :

I want to dump values for a specific year only (let's say 2009) in a graph, another graph will show 2009 values compared to 2008 values. I don't know how to build the 2009 only graph. 2009 is a variable used in the load script, can I define a favorite from a variable ? Is there another way ?

I hope it's clear, Many thanks,

1 Solution

Accepted Solutions
Not applicable
Author

In your Load, set a variable with the year number of that load. For example vYear = 2009.

Then in your chart expressions, use: Sum({<Year = $(#vYear)>} Fact_Field)

That will only Sum where the Year is the same as your variable.

View solution in original post

4 Replies
Not applicable
Author

Can you show a snippet of how you're handling the variable in the load?

You should be able to set the value of a QlikView variable in the load as well: SET vYearValue = 'Use the variable definition here'

I think however you are applying the variable to the load should also work for supplying it to a QlikView variable.

Then you should be able to use that variable and Set Analysis to create your chart.

Not applicable
Author

Hi, I have no problem to set the variable from the load, and then use it in the QV application.

My problem is to dump a chart for only one value of a field, that value should be given by the variable, I can do that woth Set analysis, withoud using Favorite ?

Not applicable
Author

In your Load, set a variable with the year number of that load. For example vYear = 2009.

Then in your chart expressions, use: Sum({<Year = $(#vYear)>} Fact_Field)

That will only Sum where the Year is the same as your variable.

Not applicable
Author

Thanks a lot, sorry I just start using Set Analysis...