Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a trigger on the Sheet level to automatically default to the maximum week. This trigger is:
='='& Max(Date(Monday_Work_Week))
The expression appears in the Current Selection as seen above. However, the maximum week is not selected (see image below).
I noticed that the date format is different. The format in the Current Selection is 03-19-2018 for the Monday_Week_Work. I date format for the Monday_Week_Work field is 2008-03-19. Could this be why? If yes, how can I fix it.
Or may be this if you want to select max irrespective of any selections
=Date(Max({1} Monday_Work_Week), 'YYYY-MM-DD')
The Monday_Work_Week is:
cast (Replace(c.StartOfWorkWeek, 'MON - ', '') as Date) as Monday_Work_Week
Try this
=Date(Max(Monday_Work_Week), 'YYYY-MM-DD')
=Date(max(Monday_Week_Work),'YYYY-MM-DD')
Trigger expression
=Max(Monday_Week_Work)
or
=Date(Max(Monday_Week_Work),'MM-DD-YYYY')
Or may be this if you want to select max irrespective of any selections
=Date(Max({1} Monday_Work_Week), 'YYYY-MM-DD')
I have changed the Monday_Work_Week field to have the format MM/DD/YYYY. I tried your code like this but it does not display anything =Date(Max({1} Monday_Work_Week), 'MM/DD/YYYY')
Your date is not longer understood as date field by Qlik... See how it left aligned
You need to make sure that your date is read properly to make this work
This is how I got the Monday_Work_Week:
(Replace(c.StartOfWorkWeek, 'MON - ', ''))Monday_Work_Week
I also tried convert and cast without success.
The trigger is still
=Date(Max({1} Monday_Work_Week), 'MM/DD/YYYY')
Is this something you did in QlikView script (under load) or in SQL script (under select)?