Forum Discussion

haefnja's avatar
haefnja
Frequent Visitor
4 years ago
Solved

Calculated Column with filters across tables

I am trying to create a new calculated column across two of my current tables.  Table 1 has the fields of "MachineID", "Start Time" and "End Time".  The start and end times here are usually 12 hours ...
  • amitchandak's avatar
    4 years ago

    haefnja , Try a new column like

     

    TotalMtlUsage = CALCULATE(sum(Table2[Totals]),filter(Table2, Table2[MachineID]=Table1[MachineID] && Table2[StartTime]>=Table1[StartTime] && Table2[EndTime]<=Table1[EndTime]))