Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Naming sub-set of a list

I have 2 excel sheets:

1. This is a list of all entities

IDValues
1A
2B
3C
4D

2. This is a subset of entities

Values
A
C
D

I want to map the values from list 2 which is a subset of 1 as 'MAPPED' and all the unmapped values as 'UNMAPPED'. So A, C and D should be mapped as 'MAPPED' and B should be mapped as 'UNMAPPED'

How can I do this in QV?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

MappedValues:

load * inline [

Values

A

B

D

];

MyData:

load ID, Values_new, if(exists('Values',Values_new),'MAPPED','UNMAPPED') as IsMapped

from ...somewhere...;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

Like this for example:

MappedValues:

load * inline [

Values

A

B

D

];

MyData:

load ID, Values, if(exists(Values),'MAPPED','UNMAPPED') as IsMapped

from ...somewhere...;

The inline load is just an example. You can replace it with some other load statement that loads the mapped values into a field named Values.


talk is cheap, supply exceeds demand
Not applicable
Author

I am a little confused here. Let me change the table once. Both table having the same column name is the confusion so changing the name of the first tables column.

IDValues_new
1A
2B
3C
4D

What should be the syntax now?

Gysbert_Wassenaar

MappedValues:

load * inline [

Values

A

B

D

];

MyData:

load ID, Values_new, if(exists('Values',Values_new),'MAPPED','UNMAPPED') as IsMapped

from ...somewhere...;


talk is cheap, supply exceeds demand