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)

restrict row number to 8 in ssrs table

(0) ShareShare
ReportReport
Posted on by 203

Hello Experts,

I have a requirement to show the top 8 customers based on the quantity, in SSRS report

I have used sorting based on sum(quantity) and changed to Z to A

I have also used group filter sum(quantity) to top n =8

but if 2 customers have same quantity rows are exceeding more than 8

i want to restrict the rows to maximum 8

Note i have used the group based on customer name

Kindly help

*This post is locked for comments

I have the same question (0)
  • Mick_4711 Profile Picture
    552 on at

    Hi Akshay,

    did you try a fetchxml with aggregate?

    (Account)

     
       
       
       
       
     
    

    (Customer)

     
       
       
       
       
     
    

    Best regard

    Mick

  • AKSHAY AURADKAR B Profile Picture
    203 on at

    Hello Mick 4711

    Thanks for your reply

    the below is my fetchxml i want sum of "new_filbillingquantityactual"+"new_dsbillingquantityactual"

    group by customer and top 8

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

     <entity name="new_filbusinessinventoryfa">

       <attribute name="createdon" />

       <attribute name="new_filbillingquantityactual" />

       <attribute name="new_dsbillingquantityactual" />

       <attribute name="new_customer" />

       <order attribute="createdon" descending="false" />

       <filter type="and">

         <condition attribute="new_reportdate" operator="on-or-after" value="@From Date" />

         <condition attribute="new_reportdate" operator="on-or-before" value="@To Date" />

    <condition attribute="statecode" operator="eq" value="0" />

       </filter>

     </entity>

    </fetch>

    kindly help me with the syntax

    Thank you

  • Verified answer
    Mick_4711 Profile Picture
    552 on at

    If you will use a grouped fetchxml this should work

     
       
         
         
         
       
       
       
       
       
       
     
    

    If you want to restrict it to the top 8 of sum "new_dsbillingquantityactual", you have to change 
       <order alias="Fillbilling" descending="true" /> to 
       <order alias="DsBilling" descending="true" />

    If you would do it this way, you wouldn't have to set a n-filter or grouping in the SSRS.


  • AKSHAY AURADKAR B Profile Picture
    203 on at

    Thank you Mick

    It is working for me at some level

    but i want total of FILbilling and DSbilling Combine to priority in top 8 customers

    Kindly Help

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans