Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have set a triggers for a sheet to select the actual week:
Action1:
Field: Year
Search String: =Year(today(2))
Action2:
Field: week
Search String: =Week(today(2))
Is it possible to change the search string that I get the next 10 weeks selected too. And what can I do that this works at the end of the year.
I think there will be a problem if I select week 50 and want the next 10 weeks selected too.
Thanks in advance for your help.
- PS -
Maybe without the date function:
='>=' & weekstart(today()) & '<=' & weekend(today()+70)
Yes, if weeks cross the year border you need a field that doesn't reset on Jan 1st. You can create such a field in the script from a date field: autonumber(weekyear(MyDate) &'|' & week(MyDate)) as WeekNum.
Hi Gysbert,
Thank you for your reply.
Do I have to "Order by" the table for this or does it just work with a field created like the one you mentioned? The column "WeekNum" looks a bit strange.
ok I added an "order by Date"
Now it looks like this:
And can you tell me how the Search String has to look like?
Hmm, I don't think using a week will work. You seem to be missing a lot of dates in between.
Try selecting in Datum. Something like ='>=' & $(=date(weekstart(today()),'DD.MM.YYYY')) & '<=' $(=date(weekend(today()+70),'DD.MM.YYYY'))
The missing dates is nothing to worry about.
The actual dates are fine and I don't need any historical dates for this is just for information and planning, no dates can be chosen at this sheet.
But your expression seems to be a good idea.. I will give it a try.
BTW: I tried to use autonumberhash128 for the WeekNum field and it created the same. No chance without pre- sorting the table through "order by".
Thank you for the expression, the qlikview syntax is killing my brain.
There was a missing " & ", I added it, but it always gives me the whole set back, as if there were no selection at all?
Maybe without the date function:
='>=' & weekstart(today()) & '<=' & weekend(today()+70)
Alright, now it works with:
='>=' & $(=num(date(weekstart(today())))) & '<=' & $(=num(date(weekend(today()+70))))
I used my numerical date field and it works very well.
Thank you very much for your help Gysbert!!!
Okay, this works. But not with the numerical field
Now I have 2 solutions... thx again.