I am trying to add location and qty in location to Historical Inventory Valuation Report - IN617000, but I have some location that doesn’t select ‘ cost seperate’. So, I get trouble to show both because with such as location that no cost seperate - the field ‘costsiteid’ show the ‘siteid’ instead of ’locationid’. I get trouble in join 3 tables including: INitemsitehist ( Location & Qty), INitemcosthist (Beg. Cost, End. Cost) and INitemcosthistbyPeriod(LastActivitiesPeriod)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/6e9e42d2-a65b-4506-b009-20b2bd2b2d11.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/a4cb201f-ef1a-4cc2-8e05-687bf7b6e84b.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/f5ebd1bb-509c-4030-9291-aa8aca5cc422.png)
Case 2
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/90495f92-8e9b-43f4-80ba-b27941afdedf.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/5eb63adf-05ee-412d-a2fa-d4b4c1a44dc0.png)
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/1077055a-bfa3-4867-8b57-31bdd6bd3dde.png)