web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Calculate average quote product line items on all quotes in a given period

(0) ShareShare
ReportReport
Posted on by 125

Hello, 

I want to evaluate average number of products being quoted in our organization in a fiscal period. I assume that it will have to be a fetchxml query or ssrs report but just not sure where to start.  I will appreciate any tip/guidance in this direction.

Best,

G

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Michel van den Brink Profile Picture
    4,697 on at
    RE: Calculate average quote product line items on all quotes in a given period

    Hello,

    This FetchXml would give you an overview of all 'extendedamount' ((Unit Price * Quantity) +Tax) of all product lines in the current fiscal year:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="quotedetail">
        <attribute name="extendedamount" />
        <filter type="and">
          <condition attribute="modifiedon" operator="this-fiscal-year" />
        </filter>
      </entity>
    </fetch>

    You could already include this in an SSRS report and average the numbers yourself.

      
    In FetchXml you can also directly do aggregates, like AVG and SUM, which you can do in SQL.
    This averages all values of 'extendedamount' ((Unit Price * Quantity) +Tax) for the current fiscal year

    <fetch aggregate="true" >
      <entity name="quotedetail" >
        <attribute name="extendedamount" alias="avg_extendedamount" aggregate="avg" />
        <filter type="and" >
          <condition attribute="modifiedon" operator="this-fiscal-year" />
        </filter>
      </entity>
    </fetch>

      

    Please take a look at this article on how to use FetchXml to build an SSRS report:
    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/analytics/create-a-new-report-using-sql-server-data-tools 

      

    My examples all use the current fiscal year as a filter, you can also remove the filter from the FetchXml and enable it for prefiltering. This allows users in Dynamics to select the period themselves:
    https://docs.microsoft.com/en-us/dynamics365/customer-engagement/analytics/improve-report-performance-by-using-filters 

    <fetch aggregate="true" >
      <entity name="quotedetail"  enableprefiltering="1" prefilterparametername="CRM_FilteredQuoteDetail">
        <attribute name="extendedamount" alias="avg_extendedamount" aggregate="avg" />
      </entity>
    </fetch>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#2
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans