Forum Discussion

Namoh's avatar
Namoh
Icon for Post Partisan rankPost Partisan
6 years ago
Solved

Formula with data from two not directly connected tables

Hi.

 

I have a bunch of tables, connected as follows.

Table FM connected to table ID

Table kpi connected to ID

Table Targets connected to FM

 

I've got another table kpi2 which is a copy of kpi

 

I want to add a column to kpi2 with the following requierments:

- if column A from table kpi2 = column B from table Targets AND column C from table kpi2 = column D from table targets then column E from Targets otherwise null

 

Is this possible?

7 Replies

    • Namoh's avatar
      Namoh
      Icon for Post Partisan rankPost Partisan

      Basically table kpi2 has data from multiple years and multiple months for multiple units.

      Table Targets has only data for some years and months.

      I need to add that data as a column for the related years/months/units.

      Table KPI2

      Column AColumn C
      123apr-20
      213apr-20
      325apr-20
      623may-20
      123may-20
      213may-20
      432may-20

       

      Column BColumn DColumn E
      213apr-2080
      325apr-2054
      100apr-2023
      123may-2065
      213may-2025
      420may-2090

      KPI2 wanted

      Column AColumn CNew Column 
      123apr-20null
      213apr-2080
      325apr-2054
      623may-20null
      123may-2065
      213may-2025
      432may-20null

       

      Hope this explains what I want.
      And hope this is what you wanted to see.

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Namoh , Try new column in KPI2 table

        sumx(filter(Target, Target[Column B] = KPI2[Column A] && Target[Column D] = KPI2[Column C]),Target[Column E])