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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading qvd-files without duplicates

Hi,

I have an application where i each day save a table into a qvd-file. and everyday i load from these saved files to get history in my appikacation.

But. I seem to get duplicates of posts, how can i make the loading (or the store into) so that only uniqe values are represented?

Right now i loada bunch of QVD's that each represents one day.

6 Replies
Not applicable
Author

Hi,

Have you tried using DISTINCT in your load statement?

If you're doing an incremental load where you're pulling new information and adding the old info to that before saving it you can also do:

Load

        (new info)

from

     (your database);

load distinct

     (old info)

from

     (your qvd file)

where

     not exists(unique field reference);

Not sure if I've explained that very well ... but try distinct first ... that should help.

Cheers,

Emma

its_anandrjs
Champion III
Champion III

Hi,

Use Distinct command option when you load data like

Load distinct

From Data

Regards

Anand

Anonymous
Not applicable
Author

Thank you for you answers i've tried both of your suggestions but with no luck. i'm not sure i'm doing it right.

my data is containing stores which can have products and the products can have different values and that value varies over time.

when i load all my qvd's without any adjustments mention above i get duplicates when using everyfield above exept value as dimension and then sum(value) as expression. this is how i do the testing. my main concern is in the chart where i'm having store as dimension and then in my expression i'm looking at a specific product where i want to show the latest value of that product.

this is the expression i'm using:

sum({$<Product={'Clothes'}, date={'=max(date(date))'}>} distinct rate)

but the max(date) thing dosn't seem to work, i get sum of rates for both dates.

Not applicable
Author

Ah … I see your problem – so the products are duplicated, but because the value has changed over time each line is unique.

For the set analysis you’re using I think you’re missing a $-sign in the max bit. Try date={$(=max(date(date)))}>} and see if that helps. I’m pretty sure it needs a dollar-sign expansion …

Emma Self

Business Information Manager | Investment Property Management

Direct +44 20 7487 1692

Main +44 20 7935 4499

emma.self@colliers.com <mailto:emma.self@colliers.com> <mailto:>

Colliers International

9 Marylebone Lane | London W1U 1HL | United Kingdom

www.colliers.com/uk

<http://www.colliers.com/markets/uk/BCSC>

Confidentiality Notice: This communication and the information it contains: (a) is intended for the person(s) or Organisation(s) named above and for no other persons or organisations and, (b) may be confidential, legally privileged and protected by law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you receive this communication in error, please notify us immediately, destroy any copies and delete it from your computer system.

its_anandrjs
Champion III
Champion III

Hi,

Please go through your SET Syntax part i thing some where it missing and also where ever you want to remove duplicates use Distinct. But some of the places they are not duplicate because some data is related with it so you need to check which fields are related with the duplicate fields in that case use aggregation for Count and Sum function.

HTH

Regrds

Anand

Anonymous
Not applicable
Author

It didn't help, i only got null values. i also tried date={$(#=max(date(date)))}>} but then i got 0,00 for values.