Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
let's say I want to display the year and the month on the X axis of a line graph
I would like to have the years displayed, and the the months displayed above the year
I tried to create this graph, with the 2 dimensions
but only the month dimension is displayed, I can't find the option to display the 2 dimensions
Can someone help me ?
thanks in advance.
Unfortunately, I don't think QlikView allows you to have more than one dimension on the X axis. A workaround here would be to create a YearMonth field so that both pieces of information are in a single field. Something like this:
date(monthstart(YourDate),'YYYY MMM') as YearMonth
I agree with John and just because I've had a couple stubborn users that insisted on only seeing one Year label you can do something like the following:
if(Month(YourDate)=1,date(monthstart(YourDate),'YYYY MMM',date(makedate(Year,Month),'MMM'))) as YearMonth
Of course, this only looks good if you don't filter months.
Regards.
Karl Pover wrote:Of course, this only looks good if you don't filter months.
Couldn't you override the display? Generally I'm against calculated dimensions, but go ahead and create the raw YearMonth field, and then you just need a way to display the year on only the minimum YearMonth for the given year. Hmmmm... OK, this seems to work:
=aggr(date(YearMonth,if(Month=min(total <Year> Month),'YYYY MMM',' MMM')),Year,YearMonth)
See attached.
Very nice.
Thank you for your answers,
I have a last question : what is the purpose of the parameters "primary dimension label orientation" and "secondary dimension label orientation" (where we can choose '-', '/' or '|' ) in the Axis tab of a graph properties ?
They make the value, such as "2010 Jan" show either horizontally, at an angle, or vertically.
Ok, I understood that, but why "primary" and "secondary" if we have only one level displayed ...
If you have just 2 expressions and 2 dimensions you can make the secondary dimension appear. It doesn't look good in the line graph (that's why we didn't mention that above), but it looks decent in a bar graph.
Regards.
OK, i had a try and it actually works with bars
I can't understand the differences with lines but it's like that ...
hope this will evolve in future versions
thanks for all your answers