Forum Discussion

Jelbeanie's avatar
Jelbeanie
Regular Visitor
1 year ago
Solved

Measuring change in values on specific dates

Hi all,    I'm trying to use 'VAR' to do measure the change between 2 numbers on specific dates.    Basically, (old-new)/old - between 2 specific points of time that won't move, or change. They a...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi lbendlin ,thanks for the quick reply, I'll add more.

    Hi Jelbeanie ,

    Try this

    Value % difference from 2019 b = 
    VAR base  =
        CALCULATE(
            SUM('Employment by Industry'[Value]),
            'Employment by Industry'[Year] IN { "2019" })
    Var future =
        CALCULATE(
            SUM('Employment by Industry'[Value]),
            'Employment by Industry'[Year] IN { "2050" })
    Var subtraction =
        base - future
    Var result =
        DIVIDE(subtraction, base)
    
    RETURN
    IF ( NOT ISBLANK(result),result)

     

    Best Regards,
    Wenbin Zhou