Are you sure the exact same expression does really work in the Qlikview document without first selecting a week?
'Week: ' & Week is really 'Week: ' & only(Week). And only(Week) can only return a value if only one value of Week is possible. That's why you first need to select a value. You could try 'Week: ' & max(Week) if you want the latest possible week regardless of if you first selected a week or not.
GetFieldSelections(Week) likewise needs selections in the Week field to return a value. But if you select more than one value then it will return the selected values as a comma separated list. But then the makeweekdate function won't return a value anymore, since it needs an integer for the week parameter, not a list of values.
Hi Gysbert, Jagan,
Thanks for your responses. I'm getting slightly different behavior now, but I'm still unable to get it to work the way it did in QlikView. In particular, the expression "makeweekdate(GetFieldSelections(Year),GetFieldSelections(Week))" does not seem to work. Here is a sequence of screenshots to show you that "Week" and "Year" have been selected appropriately, but that makeweekdate() does not work. Have either of you seen makeweekdate() work in Qlik Sense?
I think you may need to upgrade to the latest release of Qlik Sense Desktop. I'm using version 1.0.1 and it is working for me. I've attached the QVF for your reference. You can download the latest version here.
Test App.qvf 320.0 K
Thanks for the responses.
I suspected that Qlik Sense wasn't liking my use of "Week" and "Year", since those seem to be keywords.
I changed those variables to "EntryWeek" and "EntryYear", reloaded the data, and rebuilt the filters and the modified the expression appropriately. No luck.
I took a look at Josh's "Test App", which indeed worked appropriately. Thanks for that example, Josh.
For kicks, I changed my variable names to "OrderWeek" and "OrderYear", like in Josh's example. I went through the same cleanup sequence as before, and this time it worked. Strange.
I went back to "EntryWeek" and "EntryYear"- again, no luck.
I went back to "OrderWeek" and "OrderYear"- again, it worked.
I went back to "EntryWeek" and "EntryYear"- this time, it worked.
I suspect there is something flaky going on with the "Title" box. I have noticed a few weird things where changes sometimes don't seem to take effect. When it gets in that state, I clear the field entirely, start from scratch, and then get what I'm looking for.
Anyway, I'm still a bit confused, but at least things are working. I'll spend a bit more time on it to see if I can figure out where things went wrong. If I find anything interesting, I'll follow up with a post.
Thanks again for the responses.