Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Contributor II

Delete "some" records


I have an issue and I don't know how to solve. I have a table with all the item prices for all the year. I replicate for every month /item and supplier the rate as a record (see example)


The problem comes when the supplier gives me a new rate or a correct one.

I'm using this script to replicate the records:


//LOAD *, 

//Date(If(ItemId = Previous(ItemId), Previous(From)-1, YearEnd(Today()))) as To_

//Resident Tarifas_pre

//Order By Proveedor_Tarifa,ItemId, From desc;

//drop table Tarifas_pre;




//LOAD From,To_ as To,ItemId,Proveedor_Tarifa,Tarifa

//, Proveedor_Tarifa&'-'&ItemId & '-' & Floor(MonthEnd(From, IterNo() - 1)) as Id_Tarifa, Floor(MonthEnd(From, IterNo() - 1)) as Month_Tarifa

//resident Tarifas_QVD

//While Floor(MonthEnd(From, IterNo() - 1)) <= To_;

and the result is the following


My question is, If I want to add a record that has been replicated, how could I erase the previous records or overwrite them with the new value (5,96 in this example)

Thank's for your help


Tags (1)
1 Reply
Honored Contributor

Re: Delete "some" records

Hi Eduard,

Is your field Id_Tarifa a unique record ID? If it is then load your amended record with the Id_Tarifa value before loading from the qvd. Then load from the qvd with a clause like

Where Not Exists(Id_Tarifa)

this will prevent the existing record in the qvd with the same reference as the amended record from being loaded.

good luck