Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fvalente
Contributor II
Contributor II

Straight table removes duplicate

Hi community I am newbie in Sense,

I am joining two qvd files with an inner join and I am then creating a table object with the result data.

The problem I am running into is that the table is removing duplicates. Is there a way I can keep it.

All "include null values" boxes have been ticked along with "Include zero values" in the data handling section.

I have spotted this with a count column on a variable I am interested in, as per below, the variable "Position"= 0 has a count of 19 but if I remove the count column I do only have one row showing 0 in the table.

table_no_duplicates.png

Is there something that I am missing, which removes the duplicates or is it an auto function?

Thank you in advance

1 Solution

Accepted Solutions
dwforest
Specialist II
Specialist II

If the count is being done in the chart and not the script, there are duplicate rows in data, but there is another field not shown in the grid that is making them unique. Standard Qlik behavior is to show only unique rows of data in a table.

Example, master calendar: if you only have Month will only show 12 rows, added day will show 365(6) rows. Number of rows in the underlying table is unchanged.

View solution in original post

6 Replies
ogster1974
Partner - Master II
Partner - Master II

Include a field in your load that identifies the source table then you wont remove records that match in the two sources.

MK9885
Master II
Master II

As in add a Key field if you've. Simply joining the fields will not match.

Maybe try 'Outer Join' ??

This keeps all the values inside the field

dwforest
Specialist II
Specialist II

If the count is being done in the chart and not the script, there are duplicate rows in data, but there is another field not shown in the grid that is making them unique. Standard Qlik behavior is to show only unique rows of data in a table.

Example, master calendar: if you only have Month will only show 12 rows, added day will show 365(6) rows. Number of rows in the underlying table is unchanged.

ArnadoSandoval
Specialist II
Specialist II

Hi Francesco,

That is Qlik Sense standard behaviour, if duplicated records have a meaning, I suggest introducing a column to avoid the behaviour, a column containining a RANDOM value may be enough, just try RND().

HTH

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
marcus_sommer

This is the intentionally default-behaviour of qlik-objects. There are not many use-cases where you really need to display each single-record, for example by checking the data-quality. For this cases you could add a rowno() or recno() within the load-statement and displaying then this field within the table, too and if you are sure that everything is like it should you should remove it again from the scriptand the table.

- Marcus

fvalente
Contributor II
Contributor II
Author

Thank you all guys for the feedback much appreciated.

I will make sure to add a count for each row and then drop it to make sure that the data is correct.

Thanks for the support

/F