Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I want to use an expression as a dimension for a line chart, I got variables set as Current month to Previous 12 months, how do I use all of them so I wouldn't have to change them every month, that they will be dramatic.
Cheers
I don't understand what you're trying to do. Can you post a small qlikview document that explains the problem?
I want to use these variables as an expression as the X axis on a line chart instead of a dimension.
LET vMonthPrevious1 = Date(Monthstart(AddMonths(Today(),-1)), 'YYYYMM');
LET vMonthPrevious2 = Date(Monthstart(AddMonths(Today(),-2)), 'YYYYMM');
LET vMonthPrevious3 = Date(Monthstart(AddMonths(Today(),-3)), 'YYYYMM');
LET vMonthPrevious4 = Date(Monthstart(AddMonths(Today(),-4)), 'YYYYMM');
LET vMonthPrevious5 = Date(Monthstart(AddMonths(Today(),-5)), 'YYYYMM');
LET vMonthPrevious6 = Date(Monthstart(AddMonths(Today(),-6)), 'YYYYMM');
LET vMonthPrevious7 = Date(Monthstart(AddMonths(Today(),-7)), 'YYYYMM');
LET vMonthPrevious8 = Date(Monthstart(AddMonths(Today(),-8)), 'YYYYMM');
LET vMonthPrevious9 = Date(Monthstart(AddMonths(Today(),-9)), 'YYYYMM');
LET vMonthPrevious10 = Date(Monthstart(AddMonths(Today(),-10)), 'YYYYMM');
LET vMonthPrevious11 = Date(Monthstart(AddMonths(Today(),-11)), 'YYYYMM');
LET vMonthPrevious12 = Date(Monthstart(AddMonths(Today(),-12)), 'YYYYMM');
Or how do I create a variable to show the last 12 months from last month, so Jan 2015 to Jan 2014.
Maybe this:
LET vLast12Months = '>=$(=' & 'MonthStart(Today(),-12))<=$(=' & 'MonthStart(Today(),-1)))';
I'll give it a go.
Also, can you use expressions/variables for the labels in the tables like qlikview?
It didn't work, it's only showing one value/point rather than 12
Oh, you're using the variable in an expression in a chart without a dimension? Yes, then the expression can only return one value. Either add twelve expressions, one for each month, or add a month dimension to your chart.
Will a chart work without a dimension in QS?
a gauge chart