← All articles

To get the latest price per item from Business Central into Excel, you need one row per item, but every source table has many rows per item: Purch. Inv. Line (123), Price List Line (7001), Value Entry (5802). VLOOKUP returns the first match it finds, not the newest. The fix is a "top one" join: link Item to the price table, sort the price rows newest first, and keep one matching row per item. Add a date filter and the same join gives you the price valid on 31 Dec 2025. Below: join types, plus the native Excel and Power Query options.
Why VLOOKUP gives you the wrong price
Say you export Value Entry filtered to purchase invoices. Item 1000 has 14 rows, one per invoice. You write a VLOOKUP against that export.
VLOOKUP stops at the first row that matches. Business Central usually hands rows over in primary key order, which for Value Entry is Entry No., so the first match is often the oldest invoice. Nobody notices, because the number looks plausible.
Where the price actually lives in Business Central
"Latest price" means different things depending on the question, so pick the table first.
[[TABLE_START]]
Question | Table | What one row represents
What did we last pay for this item? | Purch. Inv. Line (123) | One line on a posted purchase invoice
What did we last pay, including all cost adjustments? | Value Entry (5802) | One cost or revenue posting against an item ledger entry
Which item movements happened, and when? | Item Ledger Entry (32) | One quantity movement (purchase, sale, adjustment, output)
What is the agreed price or cost on a given date? | Price List Line (7001) | One price with a Starting Date and optional Ending Date
What did we last sell it for? | Sales Invoice Line (113) or Value Entry (5802) | One invoice line, or one sales value posting
[[TABLE_END]]
Two practical notes. Item Ledger Entry holds quantities; the cost and sales amounts on it are FlowFields calculated from Value Entry, so for prices Value Entry is usually the cleaner source. And Price List Line holds agreed prices, not what was actually invoiced.
A shortcut: the Item card (Item, table 27) has a Last Direct Cost field that Business Central updates from purchase postings. If all you need is the current last cost per item, that field may be enough. It cannot give you a past date, a vendor split or a sales price.
Join types in plain words
A join means "for every row in table A, find the matching rows in table B". The join type decides what happens with zero matches, or more than one. Here table A is Item (27) and table B is the price source.
[[TABLE_START]]
Join type | What you get | Latest price example
Inner | Only items that have at least one price row, and one output row per matching price row | Item 1000 appears 14 times, once per invoice. Not what you want.
Outer | Every item, with price rows where they exist and blanks where they do not | Same duplication as inner, plus items never purchased show up with an empty price
Inner top 1 | The first matching row per item, items without a match are dropped | Item 1000 appears once, with its latest invoice price if the price rows are sorted newest first
Outer top 1 | The first matching row per item, every item kept, blank price where there is none | The full item list with latest price, and visible gaps for items that were never bought
Not Exists | Only items with no matching price row at all | Items never purchased. Useful as a check list, not for prices
Methode | A calculation such as Sum, Count or Average over the matching rows, one result per item | Total purchased quantity or average cost per item, rather than one specific price
[[TABLE_END]]
For most price reports outer top 1 is the one you want. Inner top 1 quietly hides items with no price, which is exactly the kind of gap a controller wants to see.
Top 1 always takes the first matching record. The sort order on the joined table decides which record that is. Sort Posting Date descending and the first record is the newest one; leave the default order and you are back at the VLOOKUP problem. The date filter then makes sure it is the newest record up to the right date.
The date filter: price valid at 31 Dec 2025
For year-end valuation you often need the price on a specific date. Put a filter on the date field of the joined table: Posting Date up to and including 31 Dec 2025. In Business Central filter syntax that is ..31-12-2025 (or the equivalent in your date format), and the same Business Central filter syntax works on a joined table in Exsion. Combined with top 1 and a descending sort, the join returns the last row on or before that date, per item.
Price List Line works slightly differently because each row has a validity window. A price is valid on 31 Dec 2025 when its Starting Date is on or before that date and its Ending Date is either on or after it, or blank. The blank Ending Date catches people out: a filter that only says Ending Date 31-12-2025.. silently drops every open-ended price. Also filter on Price Type (sale or purchase) and on Status, so draft or inactive lines do not win.
How to do it with a top 1 join in Exsion
In Exsion Reporting the join is built in the query grid inside Excel. We covered the mechanics in how to join Business Central tables in Excel. The latest price version:
Start a download on Item (27). Add the fields you want per item: No., Description, Base Unit of Measure, Vendor No.
Add the price table as a joined table, for example Value Entry (5802). Exsion proposes the join key itself: Item No. on Value Entry to No. on Item.
Set the join type to outer top 1, so every item stays in the list and only one price row comes back per item.
Sort the joined table on Posting Date descending, so the first matching row is the newest.
On the joined table, filter Item Ledger Entry Type to Purchase and Document Type to Purchase Invoice, so transfers and adjustments do not count as a price.
For an as-of report, add the date filter on Posting Date: ..31-12-2025. The filter can also point at a cell in the workbook, so the next person only changes the date.
Pick the fields from the joined table: Posting Date, Document No., Cost per Unit. Refresh.
You get one row per item, with the date and invoice the price came from next to it, so a questioned number has its source right there. The query sits in the workbook as a readable grid: the next person sees which table, filter, sort and join type produced the price. It reads Business Central live as the signed-in user, and extension tables work the same way if your prices live in an add-on.
The native alternatives, honestly
You do not need an add-in for this. Both of these work, with trade-offs.
Excel: XLOOKUP searching from the bottom
XLOOKUP has a search mode argument. Set it to -1 and it searches from the last row up, so it returns the last match instead of the first. If your export is sorted by posting date ascending, =XLOOKUP(A2, Items, Prices, "", 0, -1) gives the latest price.
The catch is the sort: re-export in a different order and the formula still returns a number, just the wrong one. A sturdier version finds the latest date first with MAXIFS, for example =MAXIFS(Dates, Items, A2), and then looks up the row matching both item and date. Add a second condition on Dates (on or before 31 Dec 2025) and it handles the as-of date too. It gets slow on large exports and it breaks if two invoices share the same date with different prices.
Power Query: group by and keep the max
In Power Query, load the price table, then use Group By on Item No. with the All Rows operation. Then add a custom column that picks the row with the highest Posting Date from each group (Table.Max on Posting Date) and expand it. You end up with one row per item. Add a filter step on Posting Date before the group for the as-of version.
A popular shortcut is to sort by date descending and then Remove Duplicates on Item No. It often works, but Power Query does not guarantee it keeps the sort order through that step unless you buffer the table first. Group By with a max is the safer pattern. Microsoft documents Group By on Learn.
The bigger question is the source. Fed from an export, it is as stale as the export. Connected to Business Central directly, it needs the right table exposed as a web service or API.
[[TABLE_START]]
Approach | Handles as-of date | Breaks when | Best for
Item card Last Direct Cost | No | You need history, vendor or sales price | Quick current cost check
XLOOKUP with search mode -1 | Only with MAXIFS added | Sort order changes or same-day duplicates | Small one-off exports
Power Query Group By with max | Yes, filter before grouping | Source is a stale export or table not exposed | Repeatable report, someone comfortable with M
Outer top 1 join, sorted newest first, with date filter | Yes, filter on the joined table | The sort or the date field is not the one you mean | Live, repeatable report finance can read and change
[[TABLE_END]]
When Exsion is not the answer
If you need the latest price inside Business Central, on a page or a purchase order, that is not a reporting problem: use the Item card fields or a page extension. If it has to feed several systems, a query object or API page built by a developer is the better home. And for a monthly snapshot, Power Query on an export costs nothing extra. Exsion earns its place when the report is refreshed often, needs an as-of date, and has to be understood by whoever inherits the workbook.
Frequently asked questions
[[FAQ_START]]
Why does VLOOKUP return an old price for my Business Central item? | VLOOKUP stops at the first matching row, and Business Central exports are usually in entry order, so the first match is often the oldest invoice. You need a lookup that picks the newest row, not the first.
Which Business Central table should I use for the latest purchase price? | Purch. Inv. Line (123) for invoiced prices, Value Entry (5802) if you want costs including adjustments, and Price List Line (7001) for agreed prices that may not have been invoiced yet.
What is a top 1 join? | A join that returns only the first matching row per base row instead of all of them. Sort the joined table newest first and that first row is the latest price per item.
What is the difference between inner top 1 and outer top 1? | Inner top 1 drops items that have no matching price row. Outer top 1 keeps every item and leaves the price blank where none exists, so gaps stay visible.
How do I get the price valid at 31 Dec 2025? | Filter the price table on Posting Date up to 31 Dec 2025, sort newest first and keep the first row per item. For Price List Line, keep rows with a Starting Date on or before that date and an Ending Date on or after it or blank.
Can I do this without an add-in? | Yes. XLOOKUP with search mode -1 on a date-sorted export, or Power Query Group By with a max on Posting Date, both work. They depend on sort order or on a data source you have to keep fresh yourself.
[[FAQ_END]]
Keep reading

Business Central Reporting GDPR Checklist for DPOs (2026)
Business Central reporting and GDPR: a 7-point DPO checklist on where finance and customer data rests, copies, access, DPAs, erasure, audit and residency.

Intercompany Elimination in Business Central, 3 Ways (2026)
Intercompany elimination in Business Central: what IC partners and consolidation do natively, a manual Excel method, and when a dedicated tool pays off.

USD and CAD Consolidation in Business Central and Excel
Consolidate a USD and CAD entity in Business Central: closing, average and historical rates, Consol. Translation Method per account, CTA and Excel reports.



