Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a calendar in my QlikView, on the dashboard I have a year and month selection available.
When entering the QlikView I want the current year and all previous months to be preselected.
Selecting the current year and month is not the problem ... but how do I select all previous months at once??
e.g.
Date now is: 18-03-2013
I want to be preselected the previous months:
Year = 2013
Month = jan, feb
if the date is: 16-09-2013
Year = 2013
Month = jan, feb, mrt, apr, may, jun, jul, aug
Selecting the year is no problem:
Year = year(addmonths(today(),-1))
But how to pre-select all previous months?!?!
Someone got an idea?
rgrds,
Anita
Found it eventually ... it wasn't as hard as I thought, but it's in the little things.
The answer was simple:
= '<=' & num(month(addmonths(today(),-1)))
rgrds Anita
hi,
put a trigger on Open document.
Select in field
='>=' & vfirstmonth & '<=' & vlastmonth
you need to get the vfirstmonth for jan
and vlastmonth= monthname(date)
HTH
Sushil
Did try the following (ofcourse as trigger on open event):
='>=' & month(yearstart(addmonths(today(),-1))) & '<=' & month(addmonths(today(),-1))
doesn't seem to work ...
Hi,
It should work with <$(=NUM(MONTH(TODAY()))) but it seems the $ extension does not work in actions.
When i do a select on the field itself with ❤️ for example, it works.
One workaround is to add a field in the load:
IF(MyMonth < MONTH(TODAY()), 1, 0) AS PreviousMonth
And then do a select for 1 in this field in the action.
Cheers,
Martin
Please upload a sample dataset or app.
HI,
This Expression return output Year Start date to till date.
here vToday= Date( Today() ) and
= (sum( {<CalDate = {">=$(=Date(Yearstart(max(CalDate)))) <=$(vToday))" }, CalYear=, CalMonth=, CalQuarter= >} Sales))
Regards,
Nirav Bhimani
The issue is nothing more but a calendar ... which I want to preselect when starting the QlikView.
Found it eventually ... it wasn't as hard as I thought, but it's in the little things.
The answer was simple:
= '<=' & num(month(addmonths(today(),-1)))
rgrds Anita