cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jschlereth Member
Member

Lookup and search an array of values

Okay,

 

Is there a process by which I can return an array of values based on matching parameters (similar to that of a lookup function)? Then, if that's possible, is there another process in which I can search through that array to check to see if a specific value exists?

 

Thanks!

Jonathan 

3 REPLIES 3
Community Support Team
Community Support Team

Re: Lookup and search an array of values

Hi @jschlereth,

 

You can try out the function "values" and operator "in" like this.

Column =
IF ( [Item] IN VALUES ( 'Table4'[all] ), "Yes", "No" )

Lookup_and_search_an_array_of_values

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jschlereth Member
Member

Re: Lookup and search an array of values

Thanks @v-jiascu-msft, this helps for the latter half of the question.

 

But I'm initially wondering how do I get an array of values based on matching values? How can I get an array of values (and "store" them as a variable) based on a vlookup for example? So rather than capturing only a single value that matches particular criteria, but multiple values.

 

 

Community Support Team
Community Support Team

Re: Lookup and search an array of values

Hi @jschlereth,

 

Can you share a sample and the expected result please? Maybe you can find out the solution in this demo.

Possibility 1. Lookup values and create an independent table.

Table =
FILTER ( 'Table1', 'Table1'[Column1] IN VALUES ( Criteria[Column1] ) )

Possibility 2. Use as a variable.

Measure =
VAR var_a =
    FILTER ( 'Table1', 'Table1'[Column1] IN VALUES ( Criteria[Column1] ) )
RETURN
    CONCATENATEX ( var_a, [Column1], "-" )

Lookup_and_search_an_array_of_values2

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.