Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Joining tables with conditional statement using min and max

Hi,    I have two tables. I would like to bring the column [Category] from table2, into table1. For my relationship I.D., I believe that I should use table1[Number] joined with a conditional statem...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, Anonymous 

    Please check the below picture and the link down below.

    It is for creating a new column.

     

     

    Goal Column CC =
    VAR currentwell = Table1[Well]
    RETURN
    CALCULATE (
    MAX ( Table2[Category] ),
    FILTER (
    Table2,
    Table2[Well] = currentwell
    && Table1[Number] >= Table2[Start Number]
    && Table1[Number] <= Table2[End Number]
    )
    )

     

    https://www.dropbox.com/s/fnj9itg4kd6z457/jklib.pbix?dl=0 

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: linkedin.com/in/jihwankim1975/

    Twitter: twitter.com/Jihwan_JHKIM