Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
Can anyone help me figure out why this QlikSense script is not working?
I want to simply loop through each row of the [Master Calendar] table, and build a new table UnitHeadcount with a single HeadcountDate field. (I will eventually nest loops to take data from multiple tables which is why I am doing it this way).
The script successfully runs, and the TRACE statement outputs the date values, however no new table is created! Any idea what I am doing wrong`?
You could try amending your UnitHeadCount load to use AUTOGENERATE. You may also need to enclose $(vDate) in quotes.
UnitHeadcount:
load
'$(vDate)' as HeadcountDate
AUTOGENERATE 1;
at first glimpse syntaxe seams ok, just try to delete the $ in the peek fonction.
can you you provide sample app so we can test?
You could try amending your UnitHeadCount load to use AUTOGENERATE. You may also need to enclose $(vDate) in quotes.
UnitHeadcount:
load
'$(vDate)' as HeadcountDate
AUTOGENERATE 1;
Hi all
Thank for your help. Putting the variable name in quotes was the solution.
FYI my problem was trying to put in one table a conditional count of rows from another table. I solved this by looping through dates, and on each loop loading to the new table a count of the other table, with the relevant conditions. This works now that the Count is only referring to one table. However it is very slow, so I am putting it aside for now.
Here is the working code FYI: