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: 
bhaskarsharma03
Creator
Creator

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
tresesco
MVP
MVP

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

=MaxString(Description)

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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
tresesco
MVP
MVP

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

=MaxString(Description)

ashfaq_haseeb
Champion III
Champion III

Hi

may be like the attachment.

Regards

ASHFAQ

bhaskarsharma03
Creator
Creator
Author

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