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
Pankaj Yadav 29Pankaj Yadav 29 

Every Fiscal Year  Mean's example

List<AggregateResult> agr = [Select 
        Sum(Amount), Calendar_Year(createdDate) From Account Where  isClosed=true And id=:userinfo.getuserId()  Group By Calendar_Year(createdDate)];
        Map<Integer, decimal> mapdetail = new Map<String, decimal>();
        for(AggregateResult a : agr)
        {
            mapdetail.put((Integer)a.get('expr1'), (Decimal) a.get('expr0'));
        }
        System.debug('sum of the year'+mapdetail);

 
SwethaSwetha (Salesforce Developers) 
HI Pankaj,
What is the challenge you are facing in this scenario?