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

Announcements

No record found.

News and Announcements icon
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

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans