Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Apply filters to multiple tables together in a query

(0) ShareShare
ReportReport
Posted on by 160
Hi everyone, 

I have a query made with the following tables; Price List Header, Price List LineCustomer and Item. I want to filter customer and item on the basis of unit price. Currently, the query outputs same combination of Item and Customer with different unit price. However, I want to show unique combination of Item and Customer. For the records having different unit prices for same Item-Customer combination, I want to filter such record based on lowest unit price. 

For example:
Right now, it outputs:  
CustomerItemUnit Price
Customer1Item14
Customer1Item15
Customer2Item16
 
The result I want:
CustomerItemUnit Price
Customer1Item14
Customer2Item16


I'd appreciate any help or suggestion. Thank you in advance. 
  • Ariba Mehdi Profile Picture
    160 on at
    Apply filters to multiple tables together in a query
    Hi YUN ZHU,

    Thank you for the response. 

    The unit price field exists in Price List Line Table, not Item table.  The hierarchy of the dataitems follow:
    Price List Header
        Price List Line
           Customer
              Item

    Thus, this does not work to filter the unique Item-Customer Combination. 
  • Suggested answer
    YUN ZHU Profile Picture
    79,326 Super User 2025 Season 1 on at
    Apply filters to multiple tables together in a query
    Hi, you can try Min method: Retrieves the lowest value of fields in the column within a group.
    For example,
     
    Hope this helps.
    Thanks.
    ZHU

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,278 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans