Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I'm currently working in a qlikview document in which I would like to set the following trigger:
- Set year to current year when opening sheet
- Select all weeks from week 1 until Today
I already set the following triggers:
- Clear all
- Select in field: =Year(ToDay())
I only need to know which string I need to use to select week 1 - today.
Kind Regards!
Do you have a week field in your calendar or data model ?
Try
- Clear all
- Select in field: =Year(floor(Today(0))
Selection/Select Possible would likely work too if you set the Year trigger beforehand.
In the calendar
Dear Jim,
This does work. But this gives me the following issue:
In our database there are orders that are already made for the upcoming weeks (Qlikview shows data from week 10 and 11 when it's only week 9.) I don't want this. I prefer that Qlikview only shows the weeks that I would like to report about (Which is today - 7).
I hope you understand what I mean.
Tom,
Can I assume this is setting the starting view for a series of KPIs/Charts etc?
If so, instead of selecting dates via the pick lists via triggers, try using variables that derive Current Year, Current Month, Current Week based on the dimension in your date model. From those you can build Current ### -1 (ie the preceding period) variables as well. It sounds like you might have 2 activities dates as well, as is common in manufacturing. The date the order was placed and the date the order is Invoiced (your week 9 vs weeks 10/11 problem)?
If you can create those variables, you can do WTD/MTD/QTD/YTD Current Month, Prior Month, etc set expressions very easily in addition to YoY views of the same without needing to force selections for time dimensions.
Can you share a sample model?
Maybe this will work.
Create a variable and name it something like vMaxWeek.
The expression should be =WEEK(TODAY())
Create your trigger like below: