Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

2 condition vlookup

 

 

Good afternoon,

 

I want to take talbe 2 ROS date on table 1.

it should match module and group. any ideas?

 

thanks for any help in advance.

<Table1>

<Table2>

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

     

     

    Good afternoon,

     

    I want to take talbe 2 ROS date on table 1.

    it should match module and group. any ideas?

     

    thanks for any help in advance.

    <Table1>

    <Table2>

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Your table1 snapshot seems broken, can you please fix it? 
    In addition, you can also try to use below calculated column formulas based on calculate function or lookupvalue function.

    Related ROS =
    LOOKUPVALUE (
        Table2[ROS],
        Table2[Module Deck], Table1[Module Deck],
        Table2[Group], Table1[Group]
    )
    
    Related ROS2 =
    CALCULATE (
        MAX ( Table2[ROS] ),
        FILTER (
            ALLSELECTED ( Table2 ),
            Table2[Module Deck] = EARLIER ( Table1[Module Deck] )
                && Table2[Group] = EARLIER ( Table1[Group] )
        )
    )

    Regards,
    Xiaoxin Sheng