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
Nidish G 6Nidish G 6 

We need custom field on Account which holds the count of closed won opportunities of that particular account for current year

We need 3 custom fields on Account object:
1. Count of Closed Won Opportunities for Curent year
2. Count of Closed Won Opportunities for current quarter
3. Count of Closed Won Opportunities for current month
kamala swarnalathakamala swarnalatha
Hi Nidish,

Please try the below one 

1.First you have to create three text fields to capture the current month, current year, and current quarter.
Then use the workflow rule to update based on the formulas as follow
a.Criteria:  YEAR(Close Date)=YEAR(Today()) then Current year=1
b.Criteria: MONTH(Close Date)=MONTH(TODAY()) then Current Month=1
 c.Criteria: AND(CEILING(MONTH(Close date)/3)=CEILING( MONTH(TODAY())/3), YEAR(Close date)= YEAR(TODAY())) then Current Quarter=1

2.Second you have create three Roll up summary based on this above text as
1. Count of Closed Won Opportunities for Current year
Count of Opportunities based on Won=True & Current Year=1 
2. Count of Closed Won Opportunities for current quarter
Count of Opportunities based on Won=True & Current Quarter=1
3. Count of Closed Won Opportunities for current month
Count of Opportunities based on Won=True & Current Month=1

Hope you understand.If you have any queries please contact us without any hesitation.

If your problem solved please mark this as the answer for the others to identify the solution.

Thanks,
K.Kamala,
Sweet Potato Tec.