Discussion Board for collaboration on QlikView Layout & Visualizations.
I am trying to restrict the range of dates appearing on the X axis of a Line Chart. on X Axis where as I have 2 years month end dates in the back end data file which is getting loaded.
I have defined 6 variables which will get me the data of the last 6 month ends. Now I am trying to put those variable on the dimention so that only those last 6 month end dates appear in the X axis.
Can anyone help me in providing the expresion that should be used to do it..?
Thanks Guys in advance
I wouldn't use variables for that, but maybe a calculated dimension (you could also use set analysis in your expressions to limit the date range, but let's start with a calculated dimension).
I assume you have a field Date with the month end dates and you want to show the last 6 months only.
Then you might try (using this as calculated dimension expression in dimension tab):
=if(Date>= addmonths(today(),-6), Date)
and also check suppress NULL on dimension tab.
If this is what you want, we can look into doing the same with set analysis, this is probably performing better on large data sets.
Hope this helps,
View solution in original post
It worked like magic..
This post is old, but someone might be able to answer. The if(date>='DATE', date) has the side effect of disbeling axis scaling when a filter is active. Is there another way to do this?