Forum Discussion

gv's avatar
gv
New Member
8 years ago
Solved

Create Custom Column by using data from previous row

I am currently creating a CustomColumn in a existing model where I need to use data from previous rows to calucate the column value. This is already existing in Excel which I am currently migrating i...
  • Ashish_Mathur's avatar
    8 years ago

    Hi,

     

    This calculated column formula seems to work

     

    =if(CALCULATE(SUM(Data[Dependency]),FILTER(Data,Data[ID]>=EARLIER(Data[ID])-2&&Data[ID]<=EARLIER(Data[ID])))>=2,Data[TestResult],BLANK())

     

    Hope this helps.

     

  • Ashish_Mathur's avatar
    8 years ago

    Hi,

     

    You have to go to Modelling > Add column and paste the query there.