Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculation Based on Previous Row

Hi,  I have a DAX formula that solves a an equation where I have two different columns and I am finding the difference between the previous row of one column and the current row of a different colum...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

     

    Try this formula:

    Column = 
    var start_custom = CALCULATE(SUM('Table'[Custom]),FILTER('Table','Table'[Index]=1))
    var cumulative_CI = CALCULATE(SUM('Table'[Current Improvement]),FILTER('Table','Table'[Index]<=EARLIER('Table'[Index])-1))
    return
    start_custom-cumulative_CI

     

    Best Regards,

    Jay