Slow moving stocks may lead to issues like expiry (in case of food items), obsolescence, and high holding costs.
That's why you need the Inventory Aging Report. It
helps you maintain a healthy business by tracking how quickly your inventory moves.
It identifies the slow and fast moving inventory, and also lets you plan your warehouse capacity.
This report is done over a SQL query based on Advanced Analytics for Zoho Finance data. You can modify the query to suit your data structure.
Follow the below steps to do this.
-
Query Table - Stock In Hand
-
Query Table - Inventory Age Tier
-
Pivot View - Inventory Aging Report
Query Table -
Stock In Hand
This tracks the stock in hand by joining different tables.
|
SELECT
/*sum of Quantity On Hand from below query*/
T1.*
SUM
(T1.
Quantity
) OVER(
PARTITION
BY T1.
"Product ID"
, T1.
"Warehouse ID"
)
AS 'Quantity On Hand',
/*calculate cumulative sum of items count in reverse order until it's equal or more that Quantity On Hand*/
sum(if
(
T1
.
"In/Out"
=
'In'
,
T1
.
Quantity
,
0
)) OVER(PARTITION
BY
T1 .
"Product ID"
, T1.
"Warehouse ID"
ORDER BY
T1.
"Transaction Date"
DESC
)
"Reverse Cumulative Total"
/*stock in hand from Stock In Flow*/
FROM (SELECT
'In'
"In/Out",
"Transaction Date",
"Warehouse ID",
"Product ID",
sum
(
"Quantity In") "Quantity",
"Price (BCY)" "Purchase Price"
FROM
"Stock In Flow Table"
WHERE
"Stock In Flow Table"
.
"EntityType"
!=
'transfer_order'
GROUP BY
1,
2,
3,
4,
6
UNION ALL
/*stock in hand from Stock Out Flow*/
SELECT
'Out',
"Transaction Date",
"Warehouse ID",
"Product ID",
-1
*
sum
(
"Quantity Out"
),
null
FROM
"Stock Out Flow Table"
WHERE
"Stock Out Flow Table"
.
"EntityType"
!=
'transfer_order'
GROUP BY
1,
2,
3,
4
UNION ALL
/*stock in hand from Transfer Order*/
SELECT
'
In',
"Date",
"Warehouse ID",
"Product ID",
sum(if(
"Transfer Order".
"Status"
=
'transferred'
,
"Transferred Quantity"
,
0
)),
if
(
"Transfer Order"
.
"Status"
=
'transferred'
,
"Cost Price"
,
null
)
FROM
"Transfer Order"
LEFT JOIN
"Transfer Order Items"
ON
"Transfer Order"
.
"Transfer Order ID"
=
"Transfer Order Items"
.
"Transfer Order ID"
WHERE
"Status" not in ( 'draft' )
GROUP BY
1,
2,
3,
4,
6
UNION ALL
/*stock in hand from Transfer Order Item*/
SELECT
'Out',
"Date",
"Warehouse ID",
"Product ID",
sum
(
"Transferred Quantity"),
"Cost Price"
FROM
"Transfer Order"
LEFT JOIN
"Transfer Order Items"
ON
"Transfer Order"
.
"Transfer Order ID"
=
"Transfer Order Items".
"Transfer Order ID"
WHERE "Status" not in ( 'draft' )
GROUP BY
1,
2,
3,
4,
6
) AS T1
|
Query Table - Inventory Age Tier
The below query tracks the age of each inventory and bucket them into the following groups.
-
0-5 days old
-
6-10 days old
-
11-15 days old
-
16-20 days old
-
older than 20 days
|
SELECT
"In/Out",
"Product ID",
"Quantity",
"Quantity On Hand",
"Reverse Cumulative Total",
"Transaction Date",
"Warehouse ID",
"Purchase Price",
/*identify the Transaction Date by comparing Reverse Cumulative Total and Quantity On Hand */
if(min(if(
"Reverse Cumulative Total" - "Quantity On Hand"
>=
0
,
"Reverse Cumulative Total" -"Quantity On Hand "
,
99999999999
)) OVER ( PARTITION
BY
"Product ID" , "Warehouse ID"
ORDER
BY
"Transaction Date"
DESC
) !=
99999999999
, (
"Quantity On Hand" -("Reverse Cumulative Total" -"Quantity" )), "Quantity" ) "Final Qty" ,
if(min(if(
"Reverse Cumulative Total" - "Quantity On Hand"
>=
0
,
"Reverse Cumulative Total" -"Quantity On Hand"
,
99999999999
)) OVER ( PARTITION
BY
"Product ID" , "Warehouse ID"
ORDER
BY
"Transaction Date"
DESC
) !=
99999999999
, (
"Quantity On Hand" -("Reverse Cumulative Total" -"Quantity" )) * "Purchase Price" , "Quantity" * "Purchase Price"
)
'Inventory valuation',
/*classify into different age tier*/
if
( Datediff (
current_date(),
"Transaction Date"
) >=
0
AND
Datediff (
current_date()
,
"Transaction Date"
) <=
5
,
'0-5 days', if(
Datediff (
current_date()
,
"Transaction Date"
) >=
6
AND
Datediff (
current_date()
,
"Transaction Date"
) <=
10
, '
6-10 days', if
( Datediff (
current_date()
,
"Transaction Date"
) >=
11
AND
Datediff (
current_date()
,
"Transaction Date"
) <=
15
, '
11- 15 days', if(
Datediff (
current_date()
,
"Transaction Date"
) >=
16
AND
Datediff (current_date(), "Transaction Date" ) <= 21 ,
'16-20 days', 'greater than 20 days')))) 'Age tier'
FROM
"Stock In Hand"
WHERE
"In/Out" = 'In'
AND
"Quantity On Hand" - ("Reverse Cumulative Total" -"Quantity" )
>
0
|
Join Data using Lookup Column
Join the Inventory Aging Query table with the Warehouse and Items tables using the following
lookup columns.
-
Warehouse ID
from Inventory Age Tier
query table -
Warehouse ID
from
Warehouse
table
-
Items ID
from Inventory Age Tier
query table -
Items ID
from
Items
table
Pivot View - Inventory Aging Report
Now you can create the inventory aging pivot over the Inventory Age Tier query table.
Follow the below steps to do so.
-
Create a new pivot over the Inventory Age Tier query table.
-
Drop the columns as follows.
-
Column
-
Age tier
from
Inventory Age Tier
query table with
Actual.
-
Row -
Warehouse Name
from
Warehouse
table and
Item Name
from
Items
table with
Actual.
-
Data
-
Purchased Quantity from Inventory Age Tier
query table with
Sum.
-
The
Click Here to Generate Pivot
button allows you to generate the report.
-
Hide the totals by clicking
Show/Hide
for all Totals.
-
Click Sort > Custom Sort for Age Tier column to arrange the age tier.
-
Now apply the required Theme.
-
Your final Inventory aging report is ready.

You can explore the solution by copying the workspace from the below link.
https://analytics.zoho.com/workspace/19601000018963001
Recent Topics
ZIA "Generate Content" action doesn't have contexual data from the ticket
"Generate Content" action doesn't have contexual data from the ticket. I try to get AI to help me with this ticket but it doesn't seem to have any ticket information as context. Although the ticket has a lot of information in it.
Zoho Desk - Zoho FSM Integration issue on Mobile and iPad
Hello Team, I am trying to create a Work Order (WO) using the Zoho FSM integration (Add-on Service) that is integrated with Zoho Desk. The issue is that the integration is not working on mobile devices and iPads. While I am able to create the WO, Request,
E-File Form 1099 Directly With the IRS From Zoho Books
The Form 1099 filing season has begun, and businesses are required to e-file certain forms with the IRS to report payments made to vendors and contractors. If your business made qualifying payments during the year, you must e-file the appropriate Form
Suggestions for showing subscribed Topics in CRM (contact record)
We have several Topics set up in ZMA. We also have a sync set up between ZMA and CRM. I'd like to display the subscribed topics on the CRM Contact record. This will allow the Sales team (who uses CRM) to see at a glance what topics a Contact is subscribed
Replies sometimes creating separate ticket
Sometimes when a customer responds to an email coming from Zoho Desk, instead of adding a reply to the original ticket, a separate ticket is created. This happens even though the response subject line contained the ticket number, and the person responding
Re-hide fields when option is unselected
Hi all Can anyone help me with this - when I create a 'show' field rule for when a dropdown option is selected, how to I make it so the 'show' option re-hides if that option is no longer selected?
Custom Fields
There is no way to add a custom field in the "Timesheet" module. Honestly, the ability to add a custom field should be available in every module.
Consultant-Only Booking Page
Zoho Bookings does not allow for Meeting Type OR Workspace-Wide booking pages to be turned off. This is detrimental to organizations that have territory-based or assigned accounts, because if prospects can go to these booking pages and either select the
Call result pop up on call when call ends
I’d like to be able to create a pop up that appears after a call has finished that allows me to select the Call Result. I'm using RingCentral. I have seen from a previous, now locked, thread on Zoho Cares that this capability has been implemented, but
Custom Sorting based on other columns in table
I need the ability to apply custom sorting to a text-based dimension in the X axis where the sorting is based on another column in the table. For example, I have a chart report where the X axis is a text label. I would like to be able to sort those text
Feature Request: Enable Custom PDF Layout Editor for All Modules (Including Package Slips)
Hello Zoho Community and Product Team, I am writing to share a suggestion that would significantly enhance the customization capabilities within Zoho Books. We all appreciate the power of the Custom PDF Layouts (the "New" template engine) that allows
Is there a way to invoke deluge function from within a widget?
Hi! I have custom functions in deluge and I was wondering whether there is any way to call this function through a widget? Something like on click of a button inside a widget, run the deluge custom function. Would this be possible?
Can a default task Priority be set?
The "Priority" field in the Task layout does not allow a default to be set. Is there another way of doing it? Because the current default is "None" and the Zoho Kanban board design has selected this field as critical information to surface by including
Adding a threshold to a line chart based on date range
I have a line chart that is tracking a percentage over time. It also has a filter for 50 different clients. I would like to create a threshold that is based on a portion of the date range. As I understand it, this would be done by adding a column to the
Resize Signature field dynamically
On the tablet, it is perfect. But on smaller mobile devices and PCs, both web and application, it is too small for people to sign. Is there any plan to make the signature field size dynamically in the future update?
Super Admin Logging in as another User
How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
Zoho Creator Application - New User Not able to access the application
In Zoho Creator, The newly added user not able to access the " Added Application" - User has received the Invitation Email, but while clicking "confirm Account" in the invitation Email, the following error message has appeared. "Sorry! you cannot accept
Deleting Salutation Field
We have updated our lead input screen and 'Salutation' has appeared. This is not visible in the 'Edit Pgae Layout' screen so cannot be moved to 'List of Removed Fields' Salutation is visible in the list in 'Customization - Fields' however I can only 'Edit' or 'Replace' I cannot delete and I do not need this field on my lead input screen. Please can you advise how to get rid of this. Screen shots can be provided if needed. Thank you Tasha
Auto-Generate & Update Asset Serial Numbers using a custom function (Assets Module)
Hello Team, I’ve been working on a script to automate one of our processes in Zoho FSM, and the core functionality has been successfully implemented. However, I’m encountering an issue related to serial number allocation, which is not working as expected.
Zoho Mail iOS app update: Access Delegated Mailbox.
Hello everyone! You can now access the delegated mailbox from within the iOS version of the Zoho Mail app. To access the delegated mailbox: Open the Zoho Mail app. Go on to the 'Email' module. Tap the profile picture. Choose the delegated mailbox Please
How to convert Lead's country field from Text to Pick List
Hi, I would like to change the default country field in ZCRM from text to pick list. It looks like not I can't delete default country field and recreate it as pick list nor can i create an new custom field country because such a label belong to default field. So what do I have to do? Any ideas? L
How create a draft via workflow?
I wish to create a workflow rule for specific emails that creates a draft response - not an automatic email reply, but just a draft with a set response ready to be verified by an agent who can then manually select recipients. Alternatively, the workflow
Function #51: Transaction Level Profitability for Quotes
Hello everyone, and welcome back to our series! In a previous post, we shared a custom function that could determine the profitability of a Sales Order. Today, we are presenting a similar function that calculates the profitability of a Quote. The setup
New feature: Invite additional guests for your bookings
Hello everyone, Greetings from Zoho Bookings! We are happy to announce the much-awaited feature Guest Invite, which enhances your booking experience like never before. This feature allows additional participants to be invited for the bookings to make
Improved Contact Sync flow in Google Integration with Zoho CRM
Hello Everyone, Your contact sync in Google integration just got revamped! We have redesigned the sync process to give users more control over what data flows into Google and ensure that this data flows effortlessly between Zoho CRM and Google. With this
الخصم على مستوى فاتورة المبيعات
السلام عليكم ورحمة الله وبركاته مطلوب في إنشاء خصم على مستوى فاتورة المبيعات وليس على مستوى البند أريد معرفة الطريقة؟
VAT and Taxes option not available
Dear ZOHO Team , The VAT and Taxes options in my ZOHO books account not available,I tried to find how to enable or check the way to use this option but unfortunately couldn't find it anywhere ,I'm in UAE ,kindly let me know what to do to solve this issue
Default Tagging on API-generated Transactions
If one assigns tags to an Item or Customer, those tags get auto-populated in each line item of an Invoice or Sales Order when one creates those documents. However, if one creates the Sales Order or Invoice via the API (either directly coding or using
Direct Feed (Bank)
Is Direct feed integration for AlRajhi and ADCB bank supported by Zoho Books in GCC/Saudi
Sales Order, Invoice and Payment numbers
Hi zoho friends, it is me again, the slow learner. I'm wondering if there is a way to have it so the Sales order, invoice and payment numbers are all the same? It would be easier for me if they were the same number so there is not so many reference numbers
Customer Satisfaction (CSAT) Report
From data to decisions: A deep dive into ticketing system reports The customer satisfaction (CSAT) report helps teams understand how customers feel about their support experience, identify service gaps, and continuously improve the help desk. It turns
Timeline Tracking Support for records updates via module import and bulk write api
Note: This update is currently available in Early Access and will soon be rolled out across all data centers (DCs) and for all editions of Zoho CRM. The update will be available to all users within your organization, regardless of their profiles or roles.
Shifts in Zoho People vs Zoho Shifts?
Hello Zoho People Team, We hope you are doing well. We are evaluating the Shifts functionality within Zoho People and comparing it to the standalone Zoho Shifts product. We’ve encountered comments and discussions suggesting that the Shifts feature inside
Disable fields in During action in Blueprint?
Hi there. I've tried field disable (setReadOnly(true)) using client script and the event is onMandatoryFormLoad on detail page, assuming it'll work on blueprint fields, but it bears no result. Is this the expected behaviour? That we can't do this yet?
Develop and publish a Zoho Recruit extension on the marketplace
Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
Subforms and automation
If a user updates a field how do we create an automation etc. We have a field for returned parts and i want to get an email when that field is ticked. How please as Zoho tells me no automation on subforms. The Reason- Why having waited for ever for FSM
Allow Managers to Create Shifts for Their Departments in Zoho People
Hello Zoho People Product Team, Greetings and hope you are doing well. This feature request is related to Zoho People - please don't move it to zoho one! We would like to submit a feature request regarding shift management permissions in Zoho People.
Zoho Learn and Zoho CRM integration
I would like to see an integration between Zoho Learn and Zoho CRM. 1. To be able to add articles in a related list in all modules 2. Zia to suggest related articles in a Deal or Case or Lead 3. Ability to read / search articles during a call / follow
Maintain steady traffic to your domain: How Domain Aliasing helps
Consider this scenario: An organization has its primary domain as administrator.com. Now it wants to shorten its domain to admin.com because it's simpler and easier to remember. However, changing the domain completely can cause the following problems:
Why Sharing Rules do Not support relative date comparison???
I am creating a Sharing Rule and simply want to share where "Last Day of Coverage" (Date field) is Greater than TODAY (Starting Tomorrow). However, sharing rules don't have the option to compare a date field to a relative date (like today), only to Static
Next Page