Hi All,
I have a question.How I can SUM incidentresolutions but only this last modified?
I have problem with SUM amount of all time spent (resolve cases) for customers. I create report with this Query:
<fetchversion="1.0"output-format="xml-platform"mapping="logical"distinct="false">
<entityname="incident">
<attributename="title"/>
<attributename="ticketnumber"/>
<attributename="createdon"/>
<attributename="incidentid"/>
<attributename="title"/>
<attributename="prioritycode"/>
<attributename="customerid"/>
<attributename="contractid"/>
<attributename="modifiedon"/>
<attributename="new_forma"/>
<attributename="new_czasrealizacji"/>
<attributename="statecode"/>
<attributename="new_adresemailzglaszajacego"/>
<orderattribute="title"descending="false"/>
<filtertype="and">
<conditionattribute="createdon"operator="on-or-after"value="@Miesiac_create"/>
<conditionattribute="modifiedon"operator="on-or-before"value="@Miesiac_modifie"/>
</filter>
<link-entityname="contractdetail"from="contractdetailid"to="contractdetailid"visible="false"link-type="outer"alias="kontrakt_pozycje">
<attributename="totalallotments"/>
<attributename="allotmentsused"/>
<attributename="allotmentsremaining"/>
</link-entity>
<link-entityname="contract"from="contractid"to="contractid"visible="false"link-type="outer"alias="kontrakt">
<attributename="totalprice"/>
<attributename="expireson"/>
<attributename="customerid"/>
<attributename="activeon"/>
</link-entity>
<link-entityname="incidentresolution"from="incidentid"to="incidentid"visible="false"link-type="outer"alias="obsluga_sprawy">
<filtertype="and">
<conditionattribute="statecode"operator="eq"value="1"/>
</filter>
<attributename="timespent"/>
<attributename="description"/>
</link-entity>
<link-entityname="task"from="regardingobjectid"to="incidentid"link-type="outer"alias="zadanie">
<filtertype="and">
<conditionattribute="activitytypecode"operator="eq"value="4212"/>
</filter>
<attributename="subject"/>
<attributename="actualdurationminutes"/>
<attributename="regardingobjectid"/>
<attributename="new_numerpru"/>
<attributename="new_datawykonaniazadania"/>
<attributename="description"/>
<attributename="createdon"/>
</link-entity>
</entity>
</fetch>
Before I add this filter:
<filtertype="and"><conditionattribute="statecode"operator="eq"value="1"/></filter>
Any reopen case and close cause a double value of time spent. If I reopen case where time spent was 1 hour and close - on a reports there was a double value - 2 hours.
This condition attribute resolve a part of problem.
This two cases have SUM time spent = 90 min. On report is 150 min.
First have one task = 30 min, second have two tasks - each of them = 30 min.
This SUM field Expression: =Sum(Fields!obsluga_sprawy_timespentValue.Value)
Any suggest?
I notice that this report SUM twice. He sums 1st task = 30 min, 2nd task = 30 min, 3rd task = 30 min and incidentresolution value has been added.
How I can SUM only last incidentresolution value?
In my post:
http://social.microsoft.com/Forums/en-US/crm/thread/a427caa7-89a4-4a73-8205-885ac176afeb