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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Query base view adding...
Finance forum

Query base view adding all fields to the group by clause

(0) ShareShare
ReportReport
Posted on by 105

I made a view based on a OAT Query that joined the VendPackingSlipTrans table with the PurchLine table and group them by the PurchId and the ActivityNumber fields to sum Qty and AmountMST. I used the view in a form and I realized that the view is not being group by the PurchId and the ActivityNumber fields.  I went to see the view directly to the SQL Database and see that the physical resulting view adds all the fields to the group by giving an unwanted result. Is there any way to avoid this?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,053 Super User 2025 Season 2 on at

    Hi Emilio,

    Can you describe in detail how you defined the view and what is the current and expected outcome (examples)?

  • Jie G Profile Picture
    on at

    Hi Emilio,

    You can  try to create view on tables. Here is a step by step guide for your reference:

    community.dynamics.com/.../how-to-create-view-in-dynamics-365

  • István Orosz Profile Picture
    2,137 on at

    Hi,

    Would you provide some more details on the view please? I mean AOT definition, mainly how did you made the grouping and the SUM in the view?

  • Suggested answer
    Emilio Molina Profile Picture
    105 on at

    Thanks a lot for you help. I was expecting that because on my query I already have the fields summarized, the resulting view will work pretty much the same as If i used the query in  X++, in the sense that the fields will have the sum value itself. I just realized that this is not the way it works. You will have to used the aggregated function in the view for each field all over again.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans