Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

YOY Calculation not giving desired result

I am trying to calculate YOY sales. For my previous year revenue. I am using the following code:

 

CALCULATE(SUM(Salesforce_Opps[ForecastValue__c]),Salesforce_Opps[StageName] IN {"Closed Won","PO/Contract","Payment received by SnapComms"},SAMEPERIODLASTYEAR('Calendar'[Date]))
 
But the value is not close to the values I get from: 
 
CALCULATE(
SUM(Salesforce_Opps[ForecastValue__c]),
'Salesforce_Opps'[CloseDate]>(EOMONTH(TODAY(),-13))&&Salesforce_Opps[CloseDate]<=EOMONTH(TODAY(),-1)
,'Salesforce_Opps'[StageName] IN {"Closed Won","PO/Contract","Payment received by SnapComms"}
)
 
I have a calendar table and linked the Date with CloseDate
  • Anonymous's avatar
    Anonymous
    6 years ago

    My apologies. The calculation actually works. I just needed to graph them against the dates to show the data that I wanted.

3 Replies