Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have defined a Trigger:
Document Properties / Triggers / OnOpen / Select In Field
Field ==> [Field1]
Search String ==> =Max(Field1)-1
It is working, but now I need to one more value to the selection. Is that possible?
Thanks in advance,
Aldo.
For expressions use
='(' & $(=Max(Field)) & '|' & $(=Min(Field)) & ')'
Hope that helps
Hello Aldo,
For values, the folowing will work
(Value1 | Value2)
Hope this helps
Hi Miguel,
I tried:
Search String ==> = ( Max([Shipments.Recognition Year])-1 | Max([Shipments.Recognition Year]) )
and is not working...
For expressions use
='(' & $(=Max(Field)) & '|' & $(=Min(Field)) & ')'
Hope that helps
Try
Select in Field => = Max([Shipments.Recognition Year])-1
Toggle Select=> = Max([Shipments.Recognition Year])
I got the idea from here: http://community.qlik.com/forums/p/23382/89372.aspx
HTH
Thanks guys.
This one also works (3 values):
= '(' & Max({1} [Shipments.Recognition Year]) & '|' & (Max({1} [Shipments.Recognition Year])-1) & '|' & (Max({1} [Shipments.Recognition Year])-2) & ')'
Miguel, is it possible to have more than one field selection? I'll give an example. I want to select the latest year and month in my trigger. i have a Year attribute and a Month attribute. I know I can create a YearMonth attribute in the script but I dont want to do this. I want to use the two attribute I already have.
So, i tried creating multiple "Select in Field" actions. First i used Year and made the search string =Max(Year). Second I used Month and the search string is =Max(Month). It would appear to me that the second select in field action overwrites the first selection. This is not what i expected but such is like.
So, i thought maybe I could write and expression to handle this. Something like what you have above but with two "different" attributes. Is this possible?
Hi,
you can use this
=Year(Today()) for your Year field
=Month(Today()) for your Month field