Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Current Value - Previous Value

Im Trying to Achive Current value - Previous Value for a non Dates dataset , I have got the result using Offset function however when im trying to integrate the same measure into an existing measure ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous 

     

    Maybe you can try to use the EARLIER function, but this function only works for the calculated column.

     

    For details on its usage, you can refer to the following documentation:

    EARLIER function (DAX) - DAX | Microsoft Learn

     

    Here is an example:

     

    Sample:

     

    Create a calculated column as follows

     

    Column = CALCULATE(MAX('Table'[NAME]), FILTER('Table', [ID] < EARLIER('Table'[ID]) && [Category] = EARLIER('Table'[Category])))

     

     

    If I've misunderstood you, please provide detailed sample data and the results you are hoping for: How to provide sample data in the Power BI Forum - Microsoft Fabric Community . Or show it as a screenshot or pbix. Please remove any sensitive data in advance. If uploading pbix files please do not log into your account.

     

    Best Regards,
    Community Support Team _Yuliax

     

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