Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to get Last Quarter

Hi All,

 

I have used the below calculation to get the lastest churn lost for my data.

Now I need to get the last quarter churn lost but my calculations are not working.

Any help in this? I have Fiscal quarter in my dataset

 

 

Latest Churn Lost =
VAR LastDateGlobal =
    CALCULATETABLE (
        LASTNONBLANK ( AGGR_ACCOUNT_ARR_MONTHEND_SNAPSHOT[DATE_KEY], 0 ),
        ALLSELECTED ( )
    )
RETURN
    CALCULATE ( SUM ( AGGR_ACCOUNT_ARR_MONTHEND_SNAPSHOT[PLAN_CHURN_LOST] ), KEEPFILTERS ( LastDateGlobal ) ) + 0
 
 

 

  • Hi Anonymous ,

     

    This is my test table:

     

    Please create a measure like below shown:

    Last Quarter Churn Lost = CALCULATE([Latest Churn Lost],FILTER('Table','Table'[Fascial Quarter] = QUARTER(TODAY()) && YEAR('Table'[Fascial year month]) = YEAR(TODAY()) - 1))

     

    You will get the last quarter churn lost:

    Best regards,

    Yadong Fang

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

1 Reply

  • v-yadongf-msft's avatar
    v-yadongf-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    This is my test table:

     

    Please create a measure like below shown:

    Last Quarter Churn Lost = CALCULATE([Latest Churn Lost],FILTER('Table','Table'[Fascial Quarter] = QUARTER(TODAY()) && YEAR('Table'[Fascial year month]) = YEAR(TODAY()) - 1))

     

    You will get the last quarter churn lost:

    Best regards,

    Yadong Fang

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