Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Iteration formulas

Hello

 

I post again as it seems after the first reply, no one comes back to the initial post to provide clarifications.

 

I need a formula that will find all matches and return a specific value out of the list/table of matches.

 

As an example, I have this Table1:

A, text1, 2/1/19

A, text2, 3/1/19

B, text3, 1/1/19

...

 

I will need to create this Table2:

A, text2

B, text3

 

The formula will look up Table2[Col1] in Table1[Col1] and then check the LATEST date in the matches and return the Table1[Col2] of the latest date.

 

I need a formula to specify:

 

1) the lookup value (this will be a column reference)

2) the column to search for that lookup value to find all the matches

3) the column to use to do the sorting (the column with the dates)

4) the value to return (column reference)

 

How can all these be specified in a Measure?

 

Also, it would be good to know, how to return a specific value when among the matches, there is a specific value. Any idea?

 

Thanks!

5 Replies