Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
raadwiptec
Creator II
Creator II

duplicate

I have a  scenario where the data gets duplicated.

For ex:

receipt no ¦ Reciept Date ¦ amount ¦ ......

1                 25-02-2015     100

1                 26-02-2016      100

We maintain 2 files from which the above data comes .one is history and the other is new file ..that is the reason we can see 2 rows. I cannot avoid the history file  and also I do not have a row id.

Can we do avoid duplicates by checking the rows something like for ex: if receipt no and recipet name is same then we should not display

5 Replies
Digvijay_Singh

Do you want to avoid the duplicated data while loading new file or just want to manage it through display. While loading new file you can use not exists(receipt No) in your load statement in case you want to avoid duplicate receipt nos.

To avoid during display you can use like firstsortedvalue(Amount,-[Receipt Date] so that latest data will be shown in table or chart.

Capture.JPG

jagan
Luminary Alumni
Luminary Alumni

Hi,

While loading new file add the flag like below

LOAD

*,

1 AS NewFlag

FROM DataSource;

Now in set analysis use

=Sum({<NewFlag={1}>} Amount)

Hope this helps you.

Regards,

jagan.

Not applicable

Hi,

Can you plot your sample data with receipt name column with cases of duplicated data and actual required data.

Not applicable

hi

history data:

    where not exists(receipt no and receipt name)

concatenate

new file

engishfaque
Specialist III
Specialist III

Dear Raadwiptec,

I hope, listed below code will help you a lot.

[History Table]:

Load [Receipt No] & ' | ' & Recipet Name as [Composite Key],

     [Receipt No],

     [Reciept Date],

     Amount

From

HistoryTable.qvd (qvd);

Concatenate ([History Table])

//[New Table]:

Load [Receipt No] & ' | ' & Recipet Name as [Composite Key],

     [Receipt No],

     [Reciept Date],

     Amount

From

HistoryTable.qvd (qvd)

Where Not Exists ([Composite Key], [Receipt No] & ' | ' & Recipet Name);

Kind regards,

Ishfaque Ahmed