
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
force distinct?
Hi, I have a field called itemnum. if the excel file has many duplicates for one itemnum because of different dates for one itemnum, can i sort of force distinct itemnum in qlikview regardless of the many different date records for one itemnum? Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How about using COUNT(Distinct itemnum) in expression?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Rachel.
That depends of your exact requirements. Let's say you want to count the distinct itemnum. It is as simply as using this expression in your charts:
Count(Distinct itemnum).
If you want to load only distinct itemnum, you'll have to ditch the dates. Probably you don't want that. Anyway, the load statement in the script would be:
Load Distinct
itemnum,
[other fields that aren't different for one itemnun]
From file.xls....
Hope it answers your doubts.
Regards.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll probably want to do the distinction at load time like:
Items:
LOAD
ItemNum
,max(ItemDate) as ItemDate
, ItemNum
FROM...
GROUP BY ItemNum, ItemNum
;
-Rob
