Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

puttemans
Valued Contributor

Select only 1 value out of a range for mapping purposes

Hi there,

I have a table out of which I'd like to create a mapping table. Problem is however that for now, there is no 1 to 1 mapping possible. For every 'identifier' in the table, there can be 1 or more MOAR's.

As the information between MOARs is similar (result of a multiplication earlier on in the process which I cannot change), I can afford to drop them, and only keep 1 per identifier. My question now is how to reduce the MOAR's so that for every identifier, I only keep 1 MOAR out of 1/2/3/.....

Thank you for the help

1 Solution

Accepted Solutions
giakoum
Honored Contributor II

Re: Select only 1 value out of a range for mapping purposes

ApplyMap does this automatically. If it encounters multiple MOARS per identifier, it will only keep the first (or the last...) it encounters.

4 Replies
giakoum
Honored Contributor II

Re: Select only 1 value out of a range for mapping purposes

Easily done but what should be the logic? which MOAR would you choose if you have 3 per identifier? The first encountered? or?

puttemans
Valued Contributor

Re: Select only 1 value out of a range for mapping purposes

Hello Ioannis,

yes, the first encountered would be fine. That doesn't really matter.

Regards,

Johan

giakoum
Honored Contributor II

Re: Select only 1 value out of a range for mapping purposes

ApplyMap does this automatically. If it encounters multiple MOARS per identifier, it will only keep the first (or the last...) it encounters.

puttemans
Valued Contributor

Re: Select only 1 value out of a range for mapping purposes

Hello Ioannis,

Thank you for pointing out. It works as wanted now. Thank you.