Forum Discussion

mejiaks's avatar
mejiaks
Frequent Visitor
7 years ago
Solved

joining tables

Hi guys   I have two tables   Kms and Incidents   in both tables i have the fileds Country, Division, Month, Year   The only difference is the last field Kms.[Total Kms] Incidents.[Total I...
  • v-yulgu-msft's avatar
    7 years ago

    Hi mejiaks,

     

    You could create a calculated table with below DAX formula:

    Join Table =
    ADDCOLUMNS (
        Kms,
        "Total Incidents", LOOKUPVALUE (
            Incidents[Total Kms],
            Incidents[Country], Kms[Country],
            Incidents[Division], Kms[Division],
            Incidents[Month], Kms[Month],
            Incidents[Year], Kms[Year]
        )
    )

     

    Best regards,

    Yuliana Gu