Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

doing same thing but getting different results from preceding load and resident load

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.

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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];

View solution in original post

3 Replies
petter
Partner - Champion III
Partner - Champion III

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...

swuehl
Champion III
Champion III

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];

Anonymous
Not applicable
Author

Thanks Stefan! It really helped