Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I'm importing dates into QV.
I'm extracting the field Year with 'Year (Date) as Year' and 'Weekstart(Date) as NumberWeek'
The I have a button that get the most recent date :
Action : Select in Field 'Date' =Max(date(Date))
It works and select the most recent date.
For exemple 14/01/2013
As this date is selected (appears in green) I can see my list boxes (Year and NumberWeek) with grey selection except for the latest Year (2013) and the corresponding NumberWeek (3) but I would like to get the green selection for those.
Any idea on how to implement this :
I've tried putting ohter action for my button :
Action : Select in Field 'Year' =Year(GetCurrentSelections(Date)) but it doesn't work...
GetCurrentSelections(Date) gives : Date = 14/01/2013
Week(max(Date)) and Year(max(Date)) looks like they'd do the trick. Alternatively, once you've selected the date, you can use Select Possible actions on your week and year fields. Either approach should work (I like the second one better).
Hi,
Can't you do the same as you did for the date field, but instead do =max(year(Date)) and =max(month(Date))?
Unfortunately I can't.. I have data on several years...
So for exemple =max(NumberWeek(Date)) will give me 54 (from 2012 data) and latest NumberWeek is actually 3 (from 2013)...
Hi
Use max(MonthName(Datefield)) function
Can you post a sample file? Am not clear in it.
Week(max(Date)) and Year(max(Date)) looks like they'd do the trick. Alternatively, once you've selected the date, you can use Select Possible actions on your week and year fields. Either approach should work (I like the second one better).
If you do the date selection first and then the year and month selection you should get the right month and year.
Add three actions to your button. The first action:
Action : Select in Field 'Date' =Max(date(Date))
The second action Select in Field 'Year' =Max(Year(Date))
The third action Select in Field 'Month' =max(Month(Date))
Hope this helps
You can apply the same logic you have used for the date selection
Action : Select in Field 'Year' =Year(Max(date(Date)))
Action : Select in Field 'Week' =Week(date(Date))