Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
plan_query:
LOAD
friday_date,
project,
funding_type,
start_dt,
planned_mandays,
window(count(DISTINCT friday_date)) as num_weeks,
window(count(DISTINCT project)) as num_projects
FROM [lib://AttachedFiles/Over Time Upload FY26.xlsx]
(ooxml, embedded labels, table is [Unpivoted Execution Plan]);
Before the May 2025 qlik sense update this query worked as expected in the data load editor. But now num_weeks returns 0 for every row. This seems to be the case if I do something similar with any numeric field. friday_date is a date/numeric field. However num_projects works just as expected and that seems to be because project is a string field, not numeric. It correctly returns 29 for every row in this case. I know there's workarounds to this specific case. But in more complicated cases, the work arounds become messier. So I'm wondering why this issue was introduced and whether there's a plan for it to be fixed.
You are right, this behavior changed with the Qlik Sense May 2025 release and it looks like a regression in the Window() function when Distinct is applied to numeric/dual fields.
Qlik's own notes for May2025 also confirm that Window() underwent engine changes and fixes in that release, which likely introduced the side-effect you're hitting.
I was reading somewhere that the same pattern over a text field still work.
So for now you can do a quick fix by converting the date/numeric field to text inside Distinct.
Window(Count(DISTINCT Text(Floor(friday_date)))) as num_weeks
This may avoid the broken numeric path.
Also you can update to the latest May-2025 patch, since Qlik is actively fixing Window() issues in this release.