web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Create report comparing todays inventory on hand vs yesterdays inventory on and (by each item)

(0) ShareShare
ReportReport
Posted on by 130

Hello All,

I am having a hard time generating a custom report with the following 3 columns:

  • Item No. (every item no. in our items table)
  • Quantity On Hand As of Today
  • Quantity On Hand As of Yesterday

I am experimenting with calcformulas, flow fields, even analysis template.....and thanks to Zhu for a great tutorial - but I am still stuck. 

Any help would be appreciated

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,407 Super User 2026 Season 1 on at

    Hi

    you must use flowfield and Flowfilter

    pastedimage1676106412738v2.png

    e.g. the "Purchases (Qty.)" field of the Item table can be filtered to AL code with a simple setfilter or setrange on the Posting date field which is a flowfilter acting on the calculation of the "Purchases (Qty.)" field

    check my answer if it helped you, thanks


    DAniele

  • SammySevens Profile Picture
    130 on at

    Thanks to this blog post - here is what I have - how does it look?

    • Extended item table 
    • Created 4 fields: YDayDate, YDayQuantity, TDayDate,TDayQuantity
    • Created new page with sourcetable = Item
    • OnOpenPage - set 2 filters for YDayDate, and TDayDate

    tableextension 60002 pExt60002ItemMfrName extends Item
    {
        fields
        {
            field(60000; "Manufacturer Name"; Text[100])
            {
                TableRelation = Manufacturer;
                Caption = 'lookupManufacturer';
                FieldClass = FlowField;
                CalcFormula = lookup(Manufacturer.Name where(Code = field("Manufacturer Code")));
            }
            field(60001; "Vendor Name"; Text[100])
            {
                TableRelation = Vendor;
                Caption = 'lookupVendorName';
                FieldClass = FlowField;
                CalcFormula = lookup(Vendor.Name where("No." = field("Vendor No.")));
            }
            field(60002; "Today Quantity"; Decimal)
            {
                Caption = 'Field';
            }
            field(60003; "yDayDate"; Date)
            {
                Editable = false;
                FieldClass = FlowFilter;
            }
            field(60004; tDayDate; Date)
            {
                Editable = false;
                FieldClass = FlowFilter;
            }
            field(60005; yDayQuantity; Decimal)
            {
                Editable = false;
                FieldClass = FlowField;
                CalcFormula = sum("Item Ledger Entry".Quantity where("Item No." = field("No."), "Posting Date" = field(yDayDate)));
    
            }
            field(60006; tDayQuantity; Decimal)
            {
                Editable = false;
                FieldClass = FlowField;
                CalcFormula = sum("Item Ledger Entry".Quantity where("Item No." = field("No."), "Posting Date" = field(tDayDate)));
            }
        }
    }

    page 60003 p60003DailyInvDelta
    {
        ApplicationArea = All;
        Caption = 'Daily Inventory Delta';
        PageType = List;
        SourceTable = Item;
        UsageCategory = Lists;
    
        layout
        {
            area(content)
            {
                repeater(General)
                {
                    field("No."; Rec."No.")
                    {
                        ToolTip = 'Specifies the number of the item.';
                    }
                    field(yDayQuantity; Rec.yDayQuantity)
                    {
                        ToolTip = 'Specifies the value of the yDayQuantity field.';
                    }
                    field(tDayQuantity; Rec.tDayQuantity)
                    {
                        ToolTip = 'Specifies the value of the tDayQuantity field.';
                    }
                }
            }
        }
        trigger OnOpenPage()
        begin
            Rec.Reset();
            If not Rec.Get() then begin
                Rec.Init();
                Rec.Insert();
            end;
            Rec.SetFilter(yDayDate, '< %1', WorkDate());
            Rec.SetFilter(tDayDate, '<= %1', WorkDate());
    
        end;
    }
    

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    Just a little tips.

    Instead of creating a new flow field you can use the existing field Net change that is already on the Item table.

     field(70; "Net Change"; Decimal)
            {
                CalcFormula = Sum("Item Ledger Entry".Quantity WHERE("Item No." = FIELD("No."),
                                                                      "Global Dimension 1 Code" = FIELD("Global Dimension 1 Filter"),
                                                                      "Global Dimension 2 Code" = FIELD("Global Dimension 2 Filter"),
                                                                      "Location Code" = FIELD("Location Filter"),
                                                                      "Drop Shipment" = FIELD("Drop Shipment Filter"),
                                                                      "Posting Date" = FIELD("Date Filter"),
                                                                      "Variant Code" = FIELD("Variant Filter"),
                                                                      "Lot No." = FIELD("Lot No. Filter"),
                                                                      "Serial No." = FIELD("Serial No. Filter"),
                                                                      "Unit of Measure Code" = FIELD("Unit of Measure Filter"),
                                                                      "Package No." = FIELD("Package No. Filter")));
                Caption = 'Net Change';
                DecimalPlaces = 0 : 5;
                Editable = false;
                FieldClass = FlowField;
            }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans