Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am trying to set up a trigger which selects weeks until previous week (i.e., current week -1) by default when a user opens the report. Can anyone help me with the expression for this?
I tried the following, but it isn't working as expected.
='("' & Concat(Weeks-1, '"|"') & '")'
Any help on this?
Thank you.
Hi,
Not quite sure if this is what your after but have you tried something like:
='>='& date((max(WhateverYourDateFieldIs)-6),'DD/MM/YYYY')
Regards
Craig
Hi Craig,
Thanks for your suggestion.
I need multiple selections to be made in field, "Week" and not date. Looks like the expression you have provided is for Date field right?
Hi,
Yes, it's for date.
Sorry - I should have read the question properly!
I think you'd still have similar logic for week field though (untested):
='>='&Week(max(WhateverYourWeekFieldIs)-1)
or if your wanting to retrieve records between two dates/week you could have (untested):
='>='&Week(max(WhateverYourWeekFieldIs)-10) & '<='&Week(max(WhateverYourWeekFieldIs)-1)
Having said that, it's probably easier for me since the date fields I need are already created as part of the load so I only need to use the "Date" field to manipulate them. (Eg Load *, date(Floor(StartDate)) as Date,Week(StartDate) as StartWeek, WeekName(StartDate) as StartWeekYear from Table1 etc)
Not sure if the above helps or hinders!
Hello,
Thanks a lot!
But the expressions didn't work for me. I would want all the weeks (week 1 to current week -1) to be selected by default when I open the report.
='>='&Week(max(WhateverYourWeekFieldIs)-1), output of this expression was 4. Not sure how!
Do you have any other suggestion?
Thank you.