Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

t_chetirbok
Valued Contributor

QV doesn't display week in ISO format

Hello,

As I know QV uses ISO format  of weeks.

But now I have a problem that week(today()) returns 52, but it should be 51.

Of course I can add FirstWeekDay, BrokenWeeks, ReferenceDay. But that is not a solution.

Do you know why I have this strange behavior?

Thanks,

Tatiana

1 Solution

Accepted Solutions
t_chetirbok
Valued Contributor

Re: QV doesn't display week in ISO format

The result of Week() function is affected by 3 environment variables: FirstWeekDay, BrokenWeeks and ReferenceDay, which are set in the beginning of a reload script.


In QV12 by default we have those variables in the beginning of a reload script.

In QV11 we don't have it.


So, make sure that you set  FirstWeekDay = 0, BrokenWeeks = 0 and ReferenceDay = 4, to have ISO format

13 Replies
upaliwije
Contributor II

Re: QV doesn't display week in ISO format

Sorry I have no idea about this please

t_chetirbok
Valued Contributor

Re: QV doesn't display week in ISO format

hmm,

Did you post this reply only for getting one point?

upaliwije
Contributor II

Re: QV doesn't display week in ISO format

Hi

Please don't think that way. If I wanted to collect points as you suggested I could have collected  a lot of points by now. In fact I replied because your post had a mail in my inbox

Re: QV doesn't display week in ISO format

Hi Tatsiana,

I am using QV 12.10 (tested in 12.10 SR7 as well) and the result is 51.

Capture.PNG

t_chetirbok
Valued Contributor

Re: QV doesn't display week in ISO format

yeah, I am using the same version.

and my system time is correct

but in QV 52

Re: QV doesn't display week in ISO format

That's strange. I'm not sure about this behavior and I never faced this issue.

marcus_sommer‌ Hope you might have some answer for this behavior.

Re: QV doesn't display week in ISO format

I think, you will getting wrong even if you use WeekName(Today())

Re: QV doesn't display week in ISO format

I assume it's a bug like mentioned here - please report it to Qlik that it could be fixed within one of the next releases. And for now as workaround you could try something like: subfield(weekname(today()), '/', 2):

- Marcus

Re: QV doesn't display week in ISO format

Yes. Weekname function is returning wrong result for me (however week function returns the correct week number).

Capture.PNG

Capture2.PNG

Capture3.PNG

Community Browser