Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mark new data

Hi,

I have a question.

I am currently building an order collector tool.

The orders are written down in Excel and then collected in Qlikview.

The client now is interested in seeing which row are added since the last reload(reload is 4 times a day).

How would i be able to mark those new rows?

Thanks for any help and ideas. !

1 Solution

Accepted Solutions
swuehl
MVP
MVP

How do you collect the data in your application?

For example, do you use an incremental load approach or a partial load?

You can think about creating a flag added to your table indicating the new records or an additional table linked to the records key field with that flag, you just need to ensure that the field / table is reset before the next load.

Or create just an additional field with the load time stamp or an load incremental identifier, and filter the records for the max value in your front end to show latest records.

View solution in original post

11 Replies
swuehl
MVP
MVP

How do you collect the data in your application?

For example, do you use an incremental load approach or a partial load?

You can think about creating a flag added to your table indicating the new records or an additional table linked to the records key field with that flag, you just need to ensure that the field / table is reset before the next load.

Or create just an additional field with the load time stamp or an load incremental identifier, and filter the records for the max value in your front end to show latest records.

maxgro
MVP
MVP

store order in a qvd file

when you reload

first load qvd

then load from excel only new record (=record not loaded from qvd) and add a flag for these records

store in qvd (without the flag)

repeat at every reload

Not applicable
Author

I like this idea.

I just dont understand how I can load only new records from Excel, can you explain that part to me?

Not applicable
Author

I normally do a full reload. I get the idea of adding some identifier to mark new data. i just need to figure out how i can mark the New data.

juleshartley
Specialist
Specialist

See Steve D blog here:

http://www.quickintelligence.co.uk/qlikview-incremental-load/

There are a few different ways of doing incremental loads, depending on the data you have.

swuehl
MVP
MVP

If you do a full reload and the original data does not have a kind of indicator flagging New records itself (like a modified timestamp field), how do you tell which records are new? Do you have a primary key and only add data, not updating ones? Then you can look into something like a incremental load, storing historic data into a qvd and loading then the historic data first and the new with a WHERE clause checking your key on existence

LOAD Key, ..., 'OLD' as Status FROM Historic.qvd (qvd);

LOAD Key,...  'New' as Status FROM ...

WHERE NOT EXISTS( Key);

edit: See also the incremental load sample in the QV cookbook:

http://robwunderlich.com/downloads/cookbook_v10c_PE.zip

Not applicable
Author

All the data is Excel Data, no primary keys are used

avkeep01
Partner - Specialist
Partner - Specialist

Hi Nard,

Does the Excel file have a unique number? For example a rownumber of unique ID? Then you can create something like this:

// Check if QVDFile exists

IF FILESIZE('<QVDfile>') > 0 THEN

MaxTable:

LOAD MAX(ID) AS Flag FROM <QVDfile>;

LET vMaxID = PEEK('Flag',0,'MaxTable');

Data:

LOAD

*

FROM <excelfile>

WHERE ID > $(vMaxID);

CONCATENATE (Data) LOAD

*

FROM <QVDfile>

ELSE

Data:

LOAD

*

FROM <excelfile>;

END IF

STORE Data into <QVDfile>;

maxgro
MVP
MVP

with not exists

as swuehl suggests