Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Correct cost date

Hello,   I have two different tables, historical cost items, and item movements. The cost of items is updated over time:   I have item movements over time. How can I calculate a measure th...
  • amitchandak's avatar
    5 years ago

    Anonymous , A new column in table 2

     

    new column =
    var _1 = maxx(filter(Table1, Table1[Date] <=Table2[Date] && Table1[Item] = table2[item]), Table1[Date])
    return
    maxx(filter(Table1, Table1[Date] = _1 && Table1[Item] = table2[item]), Table1[Cost])