You need to sign in to do that
Don't have an account?
Willie Mullen
SOQL - New Deals This Year By Month
Hi, I'm struggling with a SOQL I'm working on. I'm trying to show a chart of # of Won Deals this Fiscal Year grouped by Close Month. Is this possible?
Sorry, I don't know anything (yet) about reports.
May some help here http://www.salesforce.com/us/developer/docs/workbook_analytics/workbook_analytics.pdf.
Regards,
Fred
All Answers
This should works if fields names are good (not sure with that): Hope this helps,
Fred
this SOQL should work
SELECT count(Id) wondeals FROM Opportunity where closedate = THIS_YEAR and IsWon = true group by CALENDAR_MONTH(closedate)
So you have to mix the 2 propositions to have the best one (I think so).
Regards,
Fred
AggregateResult[] results = [SELECT count(ID)
FROM Opportunity
WHERE IsWon = true
AND FISCAL_YEAR(CloseDate) = THIS_YEAR,
GROUP BY CALENDAR_MONTH(CloseDate)
Sorry, I'm very new to SOQL.
Select SUM(of_New_Clients__c), CALENDAR_MONTH(CloseDate) FROM Opportunity WHERE IsWon = true AND CloseDate = THIS_YEAR GROUP BY CALENDAR_MONTH(CloseDate)
This is the result:
This is the goal:
Sorry, I don't know anything (yet) about reports.
May some help here http://www.salesforce.com/us/developer/docs/workbook_analytics/workbook_analytics.pdf.
Regards,
Fred
Did you find the answer you want?
If so, can you mark this question as Solved and share with people.
If any you can also mark the answer which help you most as the best ;)
Regards,
Fred
Regards,
Fred