Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Comparing Change in data in 2 time periods

I am working on Real Estate data and i have 10 years data. i have to generate 2 KPIs   fist is the AVERAGE AREA SIZE OF TRANSACTED LAND and you may guessed it the average was calculated as follows ...
  • v-yuta-msft's avatar
    7 years ago

    Anonymous ,

     

    Suppose past Period is 2 years ago and assume no other tables. You may create a measure using DAX like pattern below:

    Changes in Average area size between time period =
    VAR Current_Year =
        YEAR ( COMPANY[Date] )
    VAR Present_Average_Area_size_per_meter =
        CALCULATE (
            [AVARAGE AREA SIZE OF TRANSACTED LAND],
            FILTER (
                ALLEXCEPT ( COMPANY, COMPANY[Meter] ),
                YEAR ( COMPANY[Date] ) <= Current_Year
                    && YEAR ( COMPANY[Date] ) >= Current_Year - 1
            )
        )
    VAR Past_Period_Average_Area_size_per_meter =
        CALCULATE (
            [AVARAGE AREA SIZE OF TRANSACTED LAND],
            FILTER (
                ALLEXCEPT ( COMPANY, COMPANY[Meter] ),
                YEAR ( COMPANY[Date] ) <= Current_Year - 2
                    && YEAR ( COMPANY[Date] ) >= Current_Year - 3
            )
        )
    RETURN
        ( Present_Average_Area_size_per_meter - Past_Period_Average_Area ) / Present_Average_Area_size_per_meter
    

    Community Support Team _ Jimmy Tao

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