Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

View item unit cost

Posted on by Microsoft Employee

I want to view the product's unit cost (Item Model Group set to Weighted Average)

where do i view the Item Unit Cost in AX ? 

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: View item unit cost

    All items cost in inventory + logic behind standard cost.

  • Guy Terry Profile Picture
    Guy Terry 28,621 Super User 2024 Season 2 on at
    RE: View item unit cost

    Do you mean the cost (value) of one unit of the inventory of an item (which, with the Weighted average model, is the running average cost of the inventory)?

  • Suggested answer
    Adineh Negahdari Profile Picture
    Adineh Negahdari 807 on at
    RE: View item unit cost

    Hi

    you can see the Cost Amount (weighted average of Items) in Inventory Management module.

    Do you want some kind of reports or what?

    Regards

    Adineh

  • Suggested answer
    Mahmoud Hakim Profile Picture
    Mahmoud Hakim 17,887 on at
    RE: View item unit cost

    if i understand you ,if you ask about unit cost for every transaction ?!

    you can go to inventory and warehouse management /inquires / transaction form .

    you will find unit cost for every transaction

  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: View item unit cost

    Hi,

    Please use the following job/code to get the product's unit cost which has item model group as a weighted average. Let me know if anything is missing.

    static void itemModelGroup(Args _args)
    {
        InventTable inventTable;
        EcoResProduct ecoResProduct;
        InventModelGroup   inventModelGroup;
        InventModelGroupItem inventModelGroupItem;
        InventItemPrice      inventItemPrice;
        InventDim            inventDim;
        
        while select * from inventTable
            where inventTable.ItemId == "XYZ"
            join ecoResProduct
            where inventTable.Product == ecoResProduct.RecId
            join ModelGroupId from  inventModelGroupItem
            where inventModelGroupItem.ItemDataAreaId == InventTable.dataAreaId
               && inventModelGroupItem.ItemId == InventTable.ItemId
            join inventModelGroup
            where inventModelGroupItem.ModelGroupDataAreaId == inventModelGroup.dataAreaId
            && inventModelGroupItem.ModelGroupId == inventModelGroup.ModelGroupId
            && inventModelGroup.InventModel == InventModel::AverageCost // Weighted avg
        {
            select firstOnly inventItemPrice
                order by ActivationDate desc
                where inventItemPrice.ItemId == inventTable.ItemId
                && inventItemPrice.PriceType == CostingVersionPriceType::Cost
                join inventDim
                where inventItemPrice.InventDimId == inventDim.inventDimId;
            if (inventItemPrice)
            {
                info(strFmt("Item: %1, ModelGroup: %2, Cost: %3, Price: %4", inventItemPrice.ItemId, inventModelGroupItem.ModelGroupId, inventItemPrice.CostingType, inventItemPrice.Price));
            }
                
        }
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templates⚡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans