microsoft / BCTech

Business Central technology samples
MIT License
557 stars 298 forks source link

Data analysis mode; pivot by Posting_Date month, quarter, year does not work for data coming from Query object #223

Open SilviuVirlan opened 9 months ago

SilviuVirlan commented 9 months ago

I have a simple query: query 50110 "Shipments By Custmer" { DataAccessIntent = ReadOnly; QueryType = Normal;

elements
{
    dataitem(DataItemName; "Item Ledger Entry")
    {
        DataItemTableFilter = "Document Type" = filter(= 'Sales Shipment');
        column(Source_No; "Source No.") { }
        column(Item_No_; "Item No.") { }
        column(Posting_Date; "Posting Date") { }
        column(Qty; Quantity) { }
        column(Sales_Amount__Actual_; "Sales Amount (Actual)") { }
    }
}

}

I trigger the query from Items page.

pageextension 50110 MyExtension extends "Item List" { layout {

}

actions
{
    addafter("Ledger E&ntries")
    {
        action("Trigger Query")
        {
            ApplicationArea = All;
            Caption = 'Analyze shipments';
            RunObject = query "Shipments By Custmer";
            Tooltip = 'Open the customer query in analysis mode.';
            Image = Item;
        }
    }
}

} I cannot pivot by Posting Date columns (year, quarter or month). Pivoting by Posting Date Year, Quarter or Month works when the underlying data is a page list.

KennieNP commented 9 months ago

Which version of the platform?

On Sun, 17 Dec 2023 at 22:13, Silviu @.***> wrote:

I have a simple query: query 50110 "Shipments By Custmer" { DataAccessIntent = ReadOnly; QueryType = Normal;

elements { dataitem(DataItemName; "Item Ledger Entry") { DataItemTableFilter = "Document Type" = filter(= 'Sales Shipment'); column(Source_No; "Source No.") { } column(ItemNo; "Item No.") { } column(Posting_Date; "Posting Date") { } column(Qty; Quantity) { } column(Sales_Amount_Actual; "Sales Amount (Actual)") { } } }

}

I trigger the query from Items page.

pageextension 50110 MyExtension extends "Item List" { layout {

}

actions { addafter("Ledger E&ntries") { action("Trigger Query") { ApplicationArea = All; Caption = 'Analyze shipments'; RunObject = query "Shipments By Custmer"; Tooltip = 'Open the customer query in analysis mode.'; Image = Item; } } }

} I cannot pivot by Posting Date columns (year, quarter or month). Pivoting by Posting Date Year, Quarter or Month works when the underlying data is a page list.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/BCTech/issues/223 or unsubscribe https://github.com/notifications/unsubscribe-auth/ABXE6S7FOS3PGH6OJE4TVXTYJ5N6ZBFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJLJONZXKZNENZQW2ZNLORUHEZLBMRPXI6LQMWBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTLDTOVRGUZLDORPXI6LQMWSUS43TOVS2M5DPOBUWG44SQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJRGU3TMOBZGMZTHAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDEMBUGUZTOOBZGA3KO5DSNFTWOZLSUZRXEZLBORSQ . You are receiving this email because you are subscribed to this thread.

Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .

--


Kennie Nybo Pontoppidan

Email: @.***

Twitter: @KennieNP

www and cv: http://pontop.dk

SilviuVirlan commented 9 months ago

My environment shows version: US Business Central 23.1 (Platform 23.0.14532.0 + Application 23.1.13431.13546)