Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to set default selection when qv opens that shows the last 12 months (if we are on march than shows march/13-March/4)
For this I calculated in the scripts a field name MonthAgo that shows how many months passed.
I added an action where
field name =MonthsAgo
and I need the search string to shows MonthsAgo>=0 and <12
I can't find the expression for it...
Thanks,
Hi,
This solution works well in my case :
0. Clear all selection
1. Create a list with MonthsAgo
2. open the search input in the listbox's label and write this expression :
=only({$<MonthsAgo={">12"}>}MonthsAgo)
3. Add a bookmark and remember its ID (if it's the firs in your document its BM01)
4. Add an action when your document open and select bookmark = > apply a bookmark => BM01
It should work well
Are the values in MonthsAgo numeric? if so, try search string like : >=0<12
you Can try this
sum({<Date_Field = {'>=$(=MonthStart(Max(Date_Field ), -12))<=$(=MonthEnd(Max(Date_Field )))'},Year=,Month=>}Sale)
Hi,
Thanks a lot for the quick reply.
I would like to use this expression inside Add Action in the document property and not in a chart.
I want to define a new action to default select the last 12 months.
Thanks,
Limor
yes there are numeric. I use this inside the "Add Action" in the "Document properties" and it is not working.
I want the program to select the last 12 months when opening the qlikview, by using the MonthsAgo field
Couple of cases have to be taken into consideration. Could you post a sample app ?
please give sample Data so i can explain more briefly
I have a calendar with year and month
and I want the default selection on opening will be only the last 12 months.
Hi,
This solution works well in my case :
0. Clear all selection
1. Create a list with MonthsAgo
2. open the search input in the listbox's label and write this expression :
=only({$<MonthsAgo={">12"}>}MonthsAgo)
3. Add a bookmark and remember its ID (if it's the firs in your document its BM01)
4. Add an action when your document open and select bookmark = > apply a bookmark => BM01
It should work well
You can try with a trigger on open documents that select in your date field the following expression:
='>='&Date(AddMonths(MonthStart(Today()),-12))
Regards.