Forum Discussion

kleien's avatar
kleien
Regular Visitor
6 years ago
Solved

DAX - Reference to previous value

Hi everyone! I need help with this. How can i create calculated column and within it reference to previous value in DAX I need this:  
  • v-yingjl's avatar
    6 years ago

    Hi kleien ,

    Create a calculated column like this:

    Result = 
    CALCULATE(
        PRODUCT('Table'[Quantity]),
        FILTER(
            ALL('Table'),
            'Table'[Quantity] <= EARLIER('Table'[Quantity])
        )
    )

     

    Best Regards,
    Yingjie Li

    If this post helps then please consider Accept it as the solution to help the other members find it more quickly.