# Totally Invoice amounts by Product Group

**URL:** <https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616>\
**Category:** Epicor ERP 10\
**Tags:** baq\
**Created:** [February 16, 2021, 12:00am UTC](https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616 "2021-02-16T00:00:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![markamiller](https://www.epiusers.help/letter_avatar_proxy/v4/letter/m/9f8e36/32.png) [@markamiller](https://www.epiusers.help/u/markamiller)\
**Post date:** [February 16, 2021, 12:00am UTC](https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616/1 "2021-02-16T00:00:57Z")

</div>

Trying to create a simple BAQ that shows total invoices by Product Group.  
 ![image](https://www.epiusers.help/uploads/default/original/3X/b/0/b0a475ca4f38f157de8a6973948b8e35455063e7.png)

So the problem is:

1. If I sum on InvcHead.InvoiceAmt the total is wrong because of the one to many relationship between InvcHead and InvcDtl.(I need InvcDtl.ProdCode to get the Product Group.)
2. I have tried summing on InvcDtl.ExtPrice + InvcDtl.TotalMiscChrg but the total is off \< $1000.00 on + $350,000.00 in invoices.  
In round numbers:  
Inv Total = $3500000  
Total from #1 above = $480000  
Total from #2 above = $348500

Is there some relationship I am unaware of? Is my Invoice calculation on values in InvDtl wrong?

Any help would be appreciated.  
Thanks

---

<div class="post-metadata">

**Author:** ![Jason\_Woods](https://www.epiusers.help/user_avatar/www.epiusers.help/jason_woods/32/80101_2.png) [@Jason\_Woods](https://www.epiusers.help/u/Jason_Woods)\
**Post date:** [February 16, 2021, 12:34am UTC](https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616/2 "2021-02-16T00:34:35Z")

</div>

You won’t need the join to ProdGrup unless you want the Description. Have you tried making it an outer join instead?

---

<div class="post-metadata">

**Author:** ![markamiller](https://www.epiusers.help/letter_avatar_proxy/v4/letter/m/9f8e36/32.png) [@markamiller](https://www.epiusers.help/u/markamiller)\
**Post date:** [February 16, 2021, 12:43am UTC](https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616/3 "2021-02-16T00:43:22Z")

</div>

I do need description. I have not tried that. Not sure I know how in the baq creator.

---

<div class="post-metadata">

**Author:** ![Jason\_Woods](https://www.epiusers.help/user_avatar/www.epiusers.help/jason_woods/32/80101_2.png) [@Jason\_Woods](https://www.epiusers.help/u/Jason_Woods)\
**Post date:** [February 16, 2021, 1:00am UTC](https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616/4 "2021-02-16T01:00:35Z")

</div>

Click on the join between InvcDtl and ProdGrup. The lower section will show the fields used in the join. On the far right there is a Dropdown to select the type of join. You will want to show all rows from InvcDtl.

---

<div class="post-metadata">

**Author:** ![markamiller](https://www.epiusers.help/letter_avatar_proxy/v4/letter/m/9f8e36/32.png) [@markamiller](https://www.epiusers.help/u/markamiller)\
**Post date:** [February 16, 2021, 1:13am UTC](https://www.epiusers.help/t/totally-invoice-amounts-by-product-group/75616/5 "2021-02-16T01:13:34Z")

</div>

Thanks Jason. I have never noticed that. Sure that will solve my problem.
