Forum Discussion

cruzp's avatar
cruzp
Icon for Helper V rankHelper V
2 years ago
Solved

Previous and Current Date Value Comparison

Hello PBI folks,    I have a data in PBI that contains snapshots including movements of specific projects from the start up to date. I want to have a comparison value that is based on what dates a...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi cruzp 

     

    Please create measures.

     

    Stage = 
    CALCULATE(
            SELECTEDVALUE('Table'[STAGE_NAME]),
            FILTER(
                ALL('Table'),
                'Table'[DATE] = MAX('New Date'[new date])
            )
    )

     

    Old Value = 
    CALCULATE(
        MAX('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MIN('Old Date'[Old date])
        )
    )

     

    New Value = 
    CALCULATE(
        MAX('Table'[STAGE_NAME]),
        FILTER(
            ALL('Table'),
            'Table'[DATE] = MAX('New Date'[new date])
    ))

     

    Here is the result.

     

     

    Regards,

    Nono Chen

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