Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get rit of multiple ID's

Dear specialists,

In my Qlikview script I collected product information form different souces and reduced it to only the information I need.

It looks like this (it is in 1 Qlikview table)

IDDIAMTRGRADEKLEURMERKEN
01FAA01004012
01FAA01004012 254
01FAA01004012 Geel/zwart
01FAA01004012 UNS S31254
01FAA010040121/2"
01FAA01004014
01FAA01004014 222
01FAA01004014 Geel/rood/zwart
01FAA01004014 -
01FAA010040141/3"

As you can see I have multiple ID's. What I want is to make a resident load from this table and make it look like:

IDDIAMTRGRADEKLEURMERKEN
01FAA010040121/2"UNS S31254Geel/zwart254
01FAA010040141/3 -Geel/rood222

Any suggestions?

Thanks Dennis.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Darn. That may mean that you don't have nulls, but zero-length strings as values. Ok, try maxstring instead for the string fields and max for numeric fields.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

Try firstvalue:

Load

     ID,

     firstvalue(DIAMTR),

     firstvalue(GRADE),

     firstvalue(KLEUR)

from ...somewhere

group by ID;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks for the suggestion Gysbert, but that does not work as I would expact.

It does get rit of the multple ID's but only gives 1 value per ID.

Like:

IDDIAMTRGRADEKLEURMERKEN
01FAA010040121/2"
01FAA010040141/3

....

Not applicable
Author

Do a lookup:

lookup#( fieldname, matchfieldname, matchfieldvalue [, tablename] )

Returns the value of fieldname corresponding to the first occurrence of the value matchfieldvalue in the field matchfieldname.

Fieldname, matchfieldname and tablename must be given as strings (e.g. quoted literals).

The search order is load order unless the table is the result of complex operations such as joins, in which case the order is not well defined.

Both fieldname and matchfieldname must be fields in the same table, specified by tablename. If tablename is omitted the current table is assumed.

If no match is found, null is returned.

Example:

lookup('Price', 'ProductID', InvoicedProd, 'pricelist')

So make a lookup at ur date, and throw back the other columns and make two dummy dates in a temptable

Gysbert_Wassenaar

Darn. That may mean that you don't have nulls, but zero-length strings as values. Ok, try maxstring instead for the string fields and max for numeric fields.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Thanks Gysbert Maxstring() seems to work perfectly for me!