Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I am unable to get the below scenario to work ...
Config : QlikView Server 11.2 SR5 on a Win 2012 box
1: Date Dimension of Years, Months, Dates
2: OnSelect Action on the Years Dimension
Scenario:
User selects the Year e.g. 2013
Requirement:
OnSelect trigger to Set Variable with a search string = Min(CalendarDate)
Expected Result:
variable should now have the Min Date of the selected year e.g. '1st Jan 2013' value
Result:
The variable does not change!
I know the trigger works as I can use a literal and plug it into the variable, I thought though that I would be ok using the Min() function to get the start date of the Year selected.
Clearly I am missing something or its just not supported by QV?
Thanks in advance
Paul
You don't need a trigger for this. Just set the variable to '=Min(CalendarDate)' including the equal sign, and then it will recalculate automatically every time you make a selection.
HIC
Hi Paul,
You can use the function MonthStart function to obtain the date that you want.
For example: MonthStart(MakeDate("here obtain the value of the selection*")
* You can use, max(year), min(year), getfieldselections(year), only(year)
MonthStart return a date with the first day of the month, and makedate generates a date with the values that you specified for the year, month and day for example MakeDate (2013,12,08) -- Year, Month, Day
Regards.
It should work for sure.Have you tried any other trigger in the same applications ?
Thanks Chiranjeevi,
This is how I Implemented it as detailed in my question, it does not work unfortunately, hence my post
cheers
see attachment
the trigger on select of field year is set variable with expression
=date(min(CalendarDate), 'DD MMM YYYY')
if you want to set the variable also when you select in different calendar fields (date field, ....), use the on select trigger
You don't need a trigger for this. Just set the variable to '=Min(CalendarDate)' including the equal sign, and then it will recalculate automatically every time you make a selection.
HIC
Thanks Henric, that makes sense when I think about it, I will test this on Monday when I'm back in the office .