

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
qlikview sees current week as 1 and not 53 giving a wrong total for the week invoicing
Hello,
i have this formula wich gives me the total invoiced amount for the current week:
=num(sum ( {< LegalEntity = {'Pomax Belgium'} ,InvoiceType={'Faktuur'}, Year = {'$(= Year( Today()))'},Week = {'$(= Week( Today()))'} >} InvoiceQty*InvoicePriceUnitNet),'#.###,##€')
Yesterday i saw that it was giving me an amount that was bigger than what was actually invoiced.
When i split up the formula in different pieces, i noticed that the piece returning the week gave me 1 as a result:
=Week = {'$(= Week( Today()))'} >}
So somehow Qlikview thinks that it is in week 1 for 2019 and not week 53.
Any idea on how this might be solved?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is because your qv settings tells qlik to use unbroken weeks, hence your week starting here in Dec. To handle this set your system variable broken_weeks to 1, i.e.- allow broken weeks. Like:
and of course don't forget to reload the application post modification of the script variable. Otherwise, you can use week function's third parameter to pass the same information.
week(timestamp [, first_week_day [, broken_weeks [, reference_day]]])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's giving me 53 only for week(today()).
May be try below expression
Week ={"$(=max(Week))"}
If you have data for future as well try below
Week ={"$(=max({<Year={'$(=year(today()))'}>}Week))"}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is because your qv settings tells qlik to use unbroken weeks, hence your week starting here in Dec. To handle this set your system variable broken_weeks to 1, i.e.- allow broken weeks. Like:
and of course don't forget to reload the application post modification of the script variable. Otherwise, you can use week function's third parameter to pass the same information.
week(timestamp [, first_week_day [, broken_weeks [, reference_day]]])
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just wanted to add the following Help link to coincide with Amit's post:
I have to admit I just learned something new off that one myself, which just goes to show there is always something new to figure out most days, thanks Amit!
If Amit's post does get things working, do not forget to use the Accept as Solution button on that post to mark it and give him credit for the help. If you have further questions, shout back.
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
