You need to sign in to do that
Don't have an account?

Can I calculate a rolling 12 months of revenue from one object to the next?
I have Object A and OBJECT B. B is the detail and A the master in a master-detail relationship
B will get records with dollar amount many times a month
On A I would like to have a total of those amounts on B but only a rolling last 12 months
Is there a way to do this without a trigger? I can total them easily but how to do the rolling 12 months?
B will get records with dollar amount many times a month
On A I would like to have a total of those amounts on B but only a rolling last 12 months
Is there a way to do this without a trigger? I can total them easily but how to do the rolling 12 months?
You can create a formula field(checkbox) in Object B.
And check your condition as,
IF( (LastmodifiedDate - Today() ) <365, TRUE,FALSE)
And in Object A, Create a roll-up summary field and use filter option, to check the above created Formula field(Checkbox) equals to TRUE.
Thanks..
If it helps you, please mark is as best answer, so it will be helpful for other developers.
All Answers
You can create a formula field(checkbox) in Object B.
And check your condition as,
IF( (LastmodifiedDate - Today() ) <365, TRUE,FALSE)
And in Object A, Create a roll-up summary field and use filter option, to check the above created Formula field(Checkbox) equals to TRUE.
Thanks..
If it helps you, please mark is as best answer, so it will be helpful for other developers.
If it helps you, please mark is as best answer, so it will be helpful for other developers.
Could you check again
First was
AND(
ISPICKVAL([Account_Assets_Flows__c].Asset_or_Flow_type__c , "Flow"),
OR(
MONTH([Account_Assets_Flows__c].Flow_Post_Date__c ) >= 4,
AND(
MONTH([Account_Assets_Flows__c].Flow_Post_Date__c) < 4,
MONTH(TODAY()) < 4
)
))
And second was
AND(
ISPICKVAL([Account_Assets_Flows__c].Asset_or_Flow_type__c , "Revenue"),
OR(
[Account_Assets_Flows__c].Revenue_Date_Month__c >= 4,
AND(
[Account_Assets_Flows__c].Revenue_Date_Month__c < 4,
MONTH(TODAY()) < 4
)
))