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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression for unique values

Hi,

I have got following data into the table box.

email date

ab@a.com 12/12/2010

ab@a.com 12/12/2010

bd@mail.com 13/12/2010

ac@y.com 13/12/2010

bd@mail.com 13/12/2010

what expression will work to display only uniqe records (remove duplicates)?

Thanks,

9 Replies
disqr_rm
Partner - Specialist III
Partner - Specialist III

Replace tablebox with a straight table (chart), put both fields as dimension, add a 1 as dummy expression, under presentation tab hide this dummy expression, and it should work just fine.

Not applicable
Author

Hi Rakesh,

It didn't work for me or i may following different approch for these steps.

is it possible you to share the screen shot as i am using personal addition?

Cheers

disqr_rm
Partner - Specialist III
Partner - Specialist III

See enclosed. You should be able to open with your personal edition.

Hope this helps.

Not applicable
Author

The table box should not show the records if they are EXACT duplicates. So, if they appear with another field that is not the same, or have a slightly different time stamp, have a wacky leading, or traling space character, etc then you'll see them print.

If the above data is exactly as it apears in your table box, and those are the only fields, then it should not show duplicates.

Additionally, table boxes can not contain expressions.

Not applicable
Author

After turning a data to chart straight table, applying a 1 dummy expression and hide the dummy cloumn; that would not allow to dislpay only unique records.

Any better expression to resolve?

Thanks,

Not applicable
Author

Can someone help me out on initail query?

Thanks

Not applicable
Author

Thats because your date field contais, not only a date as it shows, but a timestamp.

You will need to make it a "date only" field.

You can do this in the script, using a numeric function called floor().

Ex:

Table:

Load email, date(floor(DateFieldName)) as date from table "X.qvd";

After that, your will be able to show the content without the duplicatesz.

Cheers,

Bruno

Not applicable
Author

Hi Bruno,

Thanks for the reply but originally date fields itself have date format. (no timestamp).

I am sure there is a clever way to remove duplicates. Any other thoughts?

Best,

johnw
Champion III
Champion III

As others have said, a table box will not display duplicates. I've loaded the exact data you posted, and created a table box. Have a look. The duplicates are removed automatically by QlikView. I have to add an ID field, and include it in the table box, if I want to see the duplicates.

I can't solve a problem that doesn't exist. Please post an example that DOES show duplicates, and maybe we'll get somewhere.