Forum Discussion

Parkyerbike's avatar
Parkyerbike
New Member
2 years ago
Solved

Trying to populate a column with data from another table, using a filter

Hi, I am new to Power BI and I am trying to create a column in a table with a customer name that is held in another table, but only where the environment is set to production   Example trying to po...
  • hackcrr's avatar
    2 years ago

    Hi, Parkyerbike 

    You might want to try the following DAX expression:

     

    Customer Name =
    CALCULATE (
        MAX ( 'Table2'[CustomerDescr] ),
        FILTER (
            'Table2',
            'Table'[Id] = 'Table2'[IdentifiedInstallationID]
                && 'Table2'[Enviroment] = "Production"
        )
    )

     

    Below is the example data I used:

    table1:

    table2:

    relationship:

    The results of the calculation columns are shown below: