This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
Discussion Board for collaboration related to QlikView App Development.
I need to select a date range (on a button) that does not include the current week. I've searched the archives and found SO many date range related questions, but nothing that answers my query.
I want to select the last 4 weeks, previous to the current week. This week is week 41, so I need the button to select weeks 37 to 40.
I've set the button actions as below, and it very happily selects from week 37 onwards, but I can't work out how to exclude the current week [max(WeekNo()].
Can anyone help?
I worked it out - thank you David for helping me find the last piece in the puzzle
I set up a variable, then selected the variable for the Field. This then selected weeks 37 to 40. I think this is the long winded way of doing it, but I get the result I need so I'm happy!
View solution in original post
=('>=' & Week(today()-35) & ' and ' & '< ' & Week(today()-7)
Thank you David.
I tweaked your expression to this:
=('>=' & Week(today()-28) & ' and ' & '<' & Week(today()))
In the selection box it now shows this:
but ........it's selecting all weeks less than 41, so has selected weeks 1 to 40. It seems the second part of the expression is over-riding the first part.
I switched it around to this:
=('<' & Week(today()) & ' and ' & '>=' & Week(today()-28))
But now it's ignoring the first part of the expression, and includes weeks 37 to 52.
Could you share your sample app that shows the issue?
Here's the simple way:
You are welcome. Could I be cheeky and get you mark my response as the correct/helpful answer. I know! I am a total points junkie 🙂