Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
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.
Hi,
Can you plot your sample data with receipt name column with cases of duplicated data and actual required data.
hi
history data:
where not exists(receipt no and receipt name)
concatenate
new file
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