Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

Dynamic QoQ%

Hi All,

 

I have created the below 2 measures to calculate the QoQ% for my data.

 

For Quarter values we follow the month end approach, i.e

 

Q1 -> Feb-April

Q2 -> May - Jul

Q3 -> Aug - Oct

Q4 -> Nov- Jan

 

As of now I have hard coded the last Quarter values in my calculation for QoQ%. Is there a way I can make it dynamic? We're comparing this quarter data Vs Same day last quarter data for QoQ% example Since today is 29th Dec so I'll be comparing data of today 29th Dec with data of last quarter same day i.e from 29th Sep - 31st October 

 

QTD ACV = CALCULATE([ACV],DATESBETWEEN(ACV[CLOSE_DATE],"11-01-2022",TODAY()))
 
QOQ% =
VAR thisQ =
    [QTD ACV]
VAR lastQ =
    CALCULATE (
        [ACV],
        DATESBETWEEN(ACV[CLOSE_DATE],"09-29-2022","10-31-2022")
    )
RETURN
    DIVIDE ( thisQ - lastQ, lastQ, 0 )

2 Replies