Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want last two months of data in dimension
how to write calculation condition
Hello,
you can try
if((yourmonthvariable = month(today()) or yourmonthvariable = month(today()) -1) , yourmonthvariable)
But you must have select the actual year in filter for that
Actually you have to add a Calculated Dimension, Try this:
aggr(only({<Date={">=date(monthstart(today(),-6))"}>} MonthYr),MonthYr)
I have date column and I want last two months in calculated dimension
Qlik dont work well creating calculated dimensions in Chart, so, use it just in an specific case. The best way is to create it on Script, for example:
LEFT JOIN (Calendar) LOAD
MonthYr,
MonthYr as Last6Mos
RESIDENT Calendar
WHERE Date >= monthstart(today(),-2);
If you use Monthstart you must subtract the number of days so it is not -2 but something like -60.