Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
t_chetirbok
Creator III
Creator III

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

13 Replies
marcus_sommer

That's bad ... I'm just on QV 11 and there it worked like it should. What will be returned by weekstart(today()) ? For me it's a bug but maybe there is some quick workaround to correct the wrong result and therefore my suggestion with weekname().

If it's a critical calculation and a urge solution is needed I would probably use a (include)-variable with a manual correction so that it would be easy to change again if there is a bug-fix available.

- Marcus

t_chetirbok
Creator III
Creator III
Author

Actually, I have a little bit different situation ) . The WeekName is correct here

t_chetirbok
Creator III
Creator III
Author

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

devarasu07
Master II
Master II

Hi,

tried similar method but it's not working for 2018 Week 1.  can you check below thread and advise me. Thanks

ISO Calendar issue