Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi experts!
when I do prceding load LOAD *, Where TmpFlag=1; I get number of rows 19 but when I do resident load
[tmpAssortments4]:
LOAD *
Resident [tmpAssortments3]
Where TmpFlag=1;
DROP Table [tmpAssortments3];
I get no of rows 22, that is correct figure. Any idea why I am losing some rows in preceding load. app/data attached.
QlikRajan,
I believe that's due to your use of the PEEK() function, which will address records from the output table, which you alter when using a preceding load with where clause.
Have a look at the Help, difference between Peek() and Previous() function.
Regards,
Stefan
edit:
Try along these lines:
[tmpAssortments3]:
NoConcatenate
LOAD *
Where TmpFlag=1;
LOAD *,
if (%SkuStoreSeasonKey= Previous(%SkuStoreSeasonKey) and [Allocated Date] <> Previous([Allocated Date]) and [Allocated Date] <> Previous(Previous([Allocated Date])), 2
,if(%SkuStoreKey= Previous(%SkuStoreKey) and %SkuStoreSeasonKey <> Previous(%SkuStoreSeasonKey) and [Allocated Date] <> Previous([Allocated Date])
and [Allocated Date] = Previous(Previous([Allocated Date])) and [Allocation Deadline Date]<> Previous ([Allocation Deadline Date]), 3, 1)) as TmpFlag //eliminate many to many relatioship
Resident [tmpAssortments2]
Where Count=4
order by %SkuStoreKey, %SkuStoreSeasonKey, [Allocated Date], [Allocation Deadline Date];
Are you sure that it is not only the log message that is fooling you? A preceding load will report the rows from the load at the bottom so possibly before the where filter. A resident load will always report what it is doing...
QlikRajan,
I believe that's due to your use of the PEEK() function, which will address records from the output table, which you alter when using a preceding load with where clause.
Have a look at the Help, difference between Peek() and Previous() function.
Regards,
Stefan
edit:
Try along these lines:
[tmpAssortments3]:
NoConcatenate
LOAD *
Where TmpFlag=1;
LOAD *,
if (%SkuStoreSeasonKey= Previous(%SkuStoreSeasonKey) and [Allocated Date] <> Previous([Allocated Date]) and [Allocated Date] <> Previous(Previous([Allocated Date])), 2
,if(%SkuStoreKey= Previous(%SkuStoreKey) and %SkuStoreSeasonKey <> Previous(%SkuStoreSeasonKey) and [Allocated Date] <> Previous([Allocated Date])
and [Allocated Date] = Previous(Previous([Allocated Date])) and [Allocation Deadline Date]<> Previous ([Allocation Deadline Date]), 3, 1)) as TmpFlag //eliminate many to many relatioship
Resident [tmpAssortments2]
Where Count=4
order by %SkuStoreKey, %SkuStoreSeasonKey, [Allocated Date], [Allocation Deadline Date];
Thanks Stefan! It really helped ![]()