Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have this script->
Table_name:
load
(week(created+Interval#(3, 'hh')) & ' week (' &WeekStart(created+Interval#(3, 'hh')) & ' - ' & WeekEnd(created+Interval#(3, 'hh')) & ')') as week,
row_id,
created,
WeekEnd(created+Interval#(3, 'hh')) as WeekEnd
;
select created, row_id
FROM table
where (created+ interval'3 hour') >='$(vDateZagr)'and
;
Next I create a table and sort by expression by the WeekEnd field. However, 1 week and 53 weeks have the same values, but how do I swap them so that 1 week goes after 53
Personally, I find another "Year_Week" column in the table useful. I always use this for sorting.
My field (week) returns like - 1 week (26.12.2022 - 01.01.2023). All weeks are different, but week 53 is exactly the as 1.
but I need 53 to go before 1 in the table
Sort by Week field by Expression = Max(Datefield)
Refer this article on broken weeks
https://community.qlik.com/t5/Design/Redefining-the-Week-Numbers/ba-p/1467199