function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MoDiggityMoDiggity 

Matrix report with percentage difference?

Hi there, I have a matrix report that shows number of sales and total sales for each account for each month.  What I'd like to add to that is the percent difference between total sales per month.  so for instance, if march sold $100, and april sold $110, I want to show +10% in april's data.  Is this possible with reporting?  I thought maybe a custom summary formula, but can't figure it out.  any help would be great.  
NagaNaga (Salesforce Developers) 
Hi Mo,


My example is:

Accounts
Months (Referral_and_Revenue__c.Month__c)
Revenue For The Month (Referral_and_Revenue__c.Revenue_For_Month__c)

Apply a formula that is like this:

IF (PREVGROUPVAL(Referral_and_Revenue__c.Revenue_For_Month__c:SUM, Referral_and_Revenue__c.Month__c) = 0
,0
 
***the above handles errors where you are trying to divide by 0***
,(Referral_and_Revenue__c.Revenue_For_Month__c:SUM -
PREVGROUPVAL(Referral_and_Revenue__c.Revenue_For_Month__c:SUM, Referral_and_Revenue__c.Month__c))
/ PREVGROUPVAL(Referral_and_Revenue__c.Revenue_For_Month__c:SUM, Referral_and_Revenue__c.Month__c))
 
Essentially the classic Excel variance formula of (New Value - Old Value) / Old Value - with PREVGROUPVAL picking up the old value from the previous group stage.

Please let me know if this helps

Best Regards
Naga Kiran