Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a graph where you can choose different years... (noob)

Hi!

Im totally new to qlikview, i have tried to look at some videos and stuff but i have som questions now and im hopefull that someone here can help me out.

Im having a excel file, with jan-dec and every month have a value say between "0-500" and then i have this information for 2 years. I have managed to create a barchart for each year, but i really want a graph just showing the "months" on the x-axis and the values on the y-axis. Then i want a listbox where i can choose between 2012 and 2013.

But when i try to create a graph i only get dots and not the line between the dots, and also i don't know how to do to change between years.

I hope this makes sence, it's quite hard to explain and english is not my native language.

Thanks for all help!!

7 Replies
swuehl
MVP
MVP

windforce,

I assume you do have a flat table with fields

Year, Month, Value

2011, Jan, 123

...

2012, Jan, 231

...

right?

It might be best to create a date field from Year and Month and to convert your Month string field to a dual value field (this makes it much easier to sort your Month in chronological order later on).

So maybe use two additional lines in your load like:

LOAD Year,RAND()*500 as Value,

date(date#(Year&Month, 'YYYYMMM')) as MonthStart,

month(date#(Year&Month, 'YYYYMMM')) as Month

INLINE [

Month, Year

Jan, 2011

Feb, 2011

Mar, 2011

Apr, 2011

May, 2011

Jun, 2011

Jul, 2011

Aug, 2011

Sep, 2011

Oct, 2011

Nov, 2011

Dec, 2011

Jan, 2012

Feb, 2012

Mar, 2012

Apr, 2012

May, 2012

Jun, 2012

Jul, 2012

Aug, 2012

Sep, 2012

Oct, 2012

Nov, 2012

Dec, 2012

];

Starting from this flat table, it should be easy to create a line chart, use Month as dimension, =sum(Value) as expression (since Month can hold multiple values for multiple years, you need to use an aggregation function here), and create a list box to choose a year (you can force always one selected value in list box properties).

Please see attached,

Stefan

Not applicable
Author

Yeah awesome, i really appreciate the help! Now i have a listbox with year and month and its works out fine! But i still have the problem that i cant make the line chart, its works fine when i use bar charts.

But when i choose line chart, and i take the months on the x-axis and the values on y-axis and and take the sum(value). Then i get dots for all the values and some wierd lines (A red and a yellow one), but i dont got any lines between the dots.

If's makes it easier for you, maby i can take a screenshot and upload?

swuehl
MVP
MVP

Sure, any more information might help. You can also post a small qvw file here.

Are you able to open my sample app or do you work with a personal edition?

Try creating a new chart object, select line chart in general tab, then 1 dimension Month (well, even 2 dimensions Year, Month should work quite nicely with one expression) and 1 expression =sum(Value). What do you mean with taking months on the x-axis (I assume you use Month as dimension), and values on y-axis (I assume you just create an expression =sum(Value))?

Not applicable
Author

Yeah i use the personal edition. I add my qvw file here so you can see my problem!

swuehl
MVP
MVP

Just remove the second dimension [Value 2012].

Start with ONE dimension, Month and

=sum([Value 2012])

as expression (as is). [Value 2012] is your measure, you usually don't use this as dimension.

You can select the years (2012 or 2013) using the list box then, but if you don't select a year, you will get the sum of 2012 and 2013 for each Month.

If you don't want that, use the option 'always one selected value' in general properties of the list box (you need to select one value first, then apply the option). Or use two dimensions, Year and Month, in your chart, thus you get a line per year.

Hope this helps,

Stefan

Not applicable
Author

Okey, now I understand! Thanks agian for the help

Do you have any further recommendations where i can learn and read more about Qlikview?

swuehl
MVP
MVP

Well, there are lots of resources.

You can start with the free online courses and the manual, or even take one of the class-room courses.

I think there are now a few books around:

http://community.qlik.com/message/98855

I personally started with the tutorials, attended a class room training and then just went on with creating some smaller and bigger samples.

Reading and contributing a lot here in/to the forum helped me most.

Here are some more tipps / opinions on how to get started:

http://community.qlik.com/thread/1543

http://community.qlik.com/message/191346

http://community.qlik.com/message/166095

http://community.qlik.com/thread/23091

http://community.qlik.com/docs/DOC-2416

Since I don't know you, it's hard for me to give you an advice on how you should go on, there is no one single way for everyone.

If you want to focus on scripting, it surely helps to know any programming language.

Knowing some data modeling basics and some SQL should be on your list (unless you want to focus on front end only, but I wouldn't recommend that).

Reading some books about dashboard design might be a good idea.

Just keep on going, it only gets easier.