Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

bhaskarsharma03
Contributor

Get one string from multiple options

Hi,

I have a scenario where one ID may have multiple descriptions. I need to create a straight table to aggregate the Amount based on the ID's; however, only one description should appear in the straight table. I am OK to have any of the multiple descriptions, with no preference as such.

Please look at the attached image for more details.

Thanks in advance for your help.

Regards,

Bhaskar

1 Solution

Accepted Solutions
MVP
MVP

Re: Re: Get one string from multiple options

Use MaxString()/MinString() like in attached qvw.

=MaxString(Description)

4 Replies
MVP
MVP

Re: Get one string from multiple options

Hi

If you dont care which description, then I would use an ApplyMap() to get the description. This functions much like a vlookup in Excel, so it will return the first match.

Create a mapping table:

    Map_Names: Mapping Load Distinct

                                   ID,

                                   Description

    Resident Data;

Now do an apply map:

     Join(Data)

     LOAD <some key field>,

          ApplyMap('Map_Names', ID) As Description,

          ...

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MVP
MVP

Re: Re: Get one string from multiple options

Use MaxString()/MinString() like in attached qvw.

=MaxString(Description)

Re: Get one string from multiple options

Hi

may be like the attachment.

Regards

ASHFAQ

bhaskarsharma03
Contributor

Re: Get one string from multiple options

Hi,

Thanks Tresesco and Ashfaq; this is exactly what I was looking for. Wonder why it didn't appear to me at the first place .

Thanks Jonathan for your response. I didn't want to use it at the script level, as in the actual implementation, I have around 15 fields where I need this solution; and all of them come from different tables . Since I will be using it in just couple of tables, I would rather do it at design level

Regards,

Bhaskar

Community Browser