Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
hansdevr
Contributor II

Remove double entries in a table, based on value

Although I still regard myself to be a newbie to QlikView, I thought this solution to a problem I had (and oh boy, did I wrestle with it..) is worthwhile posting.

Let's suppose you have a table, in which you have many entries for one Id. Sometimes, it's handy to "clean-up" that table and lose all records, except those with the highest value in a certain field (other than Id). This could be a date, an amount of $, anything.

I have done some experimenting with peek() function. Maybe this might come in handy for some of you.

Of course, you gurus out there who have a far more simple solution: I'm eager to learn about it!

I have attached the simple qvw file.

Best regards,

Hans

4 Replies
ramasaisaksoft
Valued Contributor III

Re: Remove double entries in a table, based on value

Hi Hans,

You can do this easily by an expression in Straight table

exp need to be like below

=aggr((max(Val)),Id#).

hansdevr
Contributor II

Re: Remove double entries in a table, based on value

Yes, it would do that in a Straight table, but what I wanted, was to create a QVD, based on the original table. Displaying the values in a Straight table, was in my case not the aim, but reducing data.

Chanty4u
Esteemed Contributor III

Re: Remove double entries in a table, based on value

  1. LOAD * 
  2. WHERE NOT WildMatch(ur data)
hansdevr
Contributor II

Re: Remove double entries in a table, based on value

Not sure I understand... Care to elaborate?

Community Browser