---
id: change/bcapps/10575
type: change
title: "#10575 Calculate Inventory: scope Default Dimension reads by source table"
summary: Report 790 Calculate Inventory now scopes Default Dimension reads by source table to prevent dimensions from unrelated locations bleeding into journal lines when item numbers and location codes collide.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - report calculate inventory
system: inventory
review:
  state: reviewed
  by: opus
  at: "2026-10-16T01:17:10.523Z"
  flags: []
generated:
  at: "2026-11-19T00:15:47.846Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 82f1099224f7690221e5e6fa638d61e5025da1ab
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/10575
    title: "microsoft/BCApps#10575: Calculate Inventory: scope Default Dimension reads by source table"
    date: "2026-10-15"
    commit: 82f1099224f7690221e5e6fa638d61e5025da1ab
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/report/790
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 10575
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/10575
kind: pr
base_branch: main
major: "30"
merged_at: "2026-10-15T18:28:25Z"
author: Franco111000
author_type: User
community_contribution: true
labels:
  - "ADO: Sync"
  - From Fork
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 3
  additions: 92
  deletions: 14
  al: 2
apps:
  - Base Application
objects_touched:
  - key: report/790
    page: report/790
    type: report
    id: 790
    name: Calculate Inventory
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/RU/BaseApp/Inventory/Counting/Journal/CalculateInventory.Report.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 654041
systems:
  - inventory
quote: null
joined_against:
  major: "30"
  commit: d2abc1d2ceae394331716c8183ef60e1534c2ce0
---

# #10575 Calculate Inventory: scope Default Dimension reads by source table

> Report 790 Calculate Inventory now scopes Default Dimension reads by source table to prevent dimensions from unrelated locations bleeding into journal lines when item numbers and location codes collide.

[Pull request](https://github.com/microsoft/BCApps/pull/10575) · merged into `main` (BC30) on 2026-10-15 by Franco111000 (community contribution) · 3 files (+92 -14), 2 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Fixed cross-product filter issue where independent OR-filters on No. and Table ID caused incorrect dimension assignments
- Changed to two scoped passes per table-number pair: one for items and one for locations
- Added regression test verifying that unrelated location dimensions do not leak when codes match
- Applied same fix to both W1 and RU layer copies of the report
- Behavior unchanged when item numbers and location codes do not collide
- Behaviour changes for users or extensions.

## AL objects touched

- [Report 790 "Calculate Inventory"](../../objects/report/790.md), Base Application: modified
- `src/Layers/RU/BaseApp/Inventory/Counting/Journal/CalculateInventory.Report.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#654041
- Labels: ADO: Sync, From Fork, Team: SCM
- Systems: inventory

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
