Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

mikevmalta
New Contributor III

Duplicate data when linking tables

Hi,

I have a project table where one field is a date, and I want to link / join it with a master calendar. Therefore, when I select a year or month, records from this table should be selected.

Having created a master calendar table and linked it with the project table (by the date field), Qlikview is considering the records as separate. For example, I am having the following:

Date               ProjectName

02/09/2013     'Project1'

02/09/2013     -

03/09/2013     -

04/09/2013     -

I would like to have only one record for the date '02/09/2013' (in this case), or more than one only if there are more project names on the same date. Furthermore, when I select the year '2013', only the record with no project name is being selected.

I tried to do a left join with the project table but still no success. I also tried to format the date field from both the project table and the master calendar table as Date, Num or text, but still no success.

Do you have any idea why this is happening please?

Thanks in advance!

1 Solution

Accepted Solutions
mikevmalta
New Contributor III

Re: Duplicate data when linking tables

Hi Guys,

Thanks a lot for your replies!

Found the source and solution to the problem!! I am now retrieving the dates for the projects without the time, and it's removing the duplicate records succesfully.

Thanks again for your contribution!

6 Replies
Not applicable

Re: Duplicate data when linking tables

Hi Mike,

It would be easier for me to help if you could upload your QVW for us to have a look at.

Thanks,

Byron

er_mohit
Honored Contributor II

Re: Duplicate data when linking tables

use distinct function

like

load distinct

fieldA,

fieldB,

....................

from table;

jvitantonio
Valued Contributor III

Re: Duplicate data when linking tables

Hi , please check the file attached. If this simple example still doesn't work, then it's because you might have data in your Project table with empy Project Names.

mikevmalta
New Contributor III

Re: Duplicate data when linking tables

Hi Guys,

Thanks a lot for your replies!

Found the source and solution to the problem!! I am now retrieving the dates for the projects without the time, and it's removing the duplicate records succesfully.

Thanks again for your contribution!

Not applicable

Re: Duplicate data when linking tables

What would be a solution if you did not have a Date field?  For example.... I only have a Date/Time field, and no other option.

mikevmalta
New Contributor III

Re: Duplicate data when linking tables

Hi Paul,

you can create another field, which would be the date version of the Date/Time field.

MakeDate(Year(yourdatetime),Month(yourdatetime),Day(yourdatetime))


Hope this answers your question.

Community Browser