Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have calendar with all fields, whereas i need to set trigger for button to select last 7weeks and 7months.
I tried with select in field trigger, but it is not working. Can any one suggest what will be the right expression for this?
I tried with this,
='>='&(WeekStart(Max(Date), -6))&'<='&(WeekEnd(Max(Date),+1)) - For Week
Same as MONTH.
Thanks,
Raju
Hi,
I just changed the Some of your Date Fields based on your QVD, and now it seems to be working.
Check the Attachment.
Could you post a sample qvw?
Hi,
Please find the attached sample app.
Hi,
I think in your table the Date is field is in UPPER case. It should be like
='>='&(WeekStart(Max(DATE), -6))&'<='&(WeekEnd(Max(DATE),+1))
It will give the return value >=1/12/2026<=3/8/2026 (if there is no Selection)
And, There is no CAL_WEEK for FEB - 2026 and MAR-2026. It show till Jan 2026.
Can you check your CAL_WEEK Field?
A general word of suggestion: - always try to create date fields using date functions, so that the created field values have numeric representation at the backend and you can apply other date functions on it. If you create the field as a text field (as it is now - your CAL_WEEK and CAL_MONTH fields), the values can't be compared/calculated directly using date functions.
Week - '11 Apr 2009' - what does it mean?
Hi Raju
PFB below expression
=Sum({<Date={'>=$(=WeekEnd(Max(Date) -49) <=$(=WeekEnd(Max(Date))+1)'}>}sales) - For Week
=Sum({<Date={'>=$(=addmonth(Mothend(Max(Date) ),-7)) <=$(=MonthEnd(Max(Date)))'}>}sales) For month
Thanks for good suggestion Tresesco, we have created calendar in SQL server, that might be the issue here. I will take care of it.
Hi,
I just changed the Some of your Date Fields based on your QVD, and now it seems to be working.
Check the Attachment.