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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Filter the records which has zero value after Sum(field) x++ / Query class / View

(0) ShareShare
ReportReport
Posted on by 770

Hi All, 

This job will iterate 1500 records in queryRun as per my query. That's correct. Among that, there 5 records only has Qty > 0. How can i filter the same in above query class?

I have added group by of Item Id and InventDimId. And Sum of Qty field.

Thanks.

7888.QueryClass.jpg

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Moved to Dynamics AX forum.

  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Which version of AX is it about? You can do it with "having", which was introduced in AX 2012, I think. Another approach would be using a summarized view.

  • Community Member Profile Picture
    on at

    Hi,

    I don't think we can filter on the sum of qty in the query.

    But it's feasible to make it with T-sql and the post below explain how to make it.

    (community.dynamics.com/.../executing-direct-sql-statements)

    regards,

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    We can do it. With "having", mentioned above.

    By the way, if you wanted to do it in T-SQL, you would need the same thing: HAVING.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans