Forum Discussion

dsandberg's avatar
dsandberg
Icon for Advocate I rankAdvocate I
9 years ago
Solved

Set value from existing column/row when adding new column to fact table.

I have a fact table which lists widgets, years, and an attribute of the widget in that year. For example: Widget_ID    Year    Attribute 1001              2005       1 1001              2006      ...
  • dsandberg's avatar
    dsandberg
    9 years ago

    Yes, this worked; I used the MAXX option because my table did have more columns. The column formula turned out to be:

     

    =MAXX(FILTER('Table',('Table'[Widget_ID] = EARLIEST('Table'[Widget_ID]) && 'Table'[Year] = EARLIER('Table'[Year])-1)),[Attribute])