Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

How to create a calculated column in a Query?

Posted on by 1
I would like to create a calculated column in a query object.  More specifically I am looking to create a new column called "TotalPlannedTime" from the "Prod. Order Routing Line" table. 
 
This column will be a combination of (3) columns: "Setup Time", "Run Time", and "Input Quantity".
 
The following is the function for calculating "TotalPlannedTime"
 
"Setup Time" + "Run Time" * "Input Quantity"
 
The following is my initial code sans "TotalPlannedTime"
query 50103 "Rel Prod Ord Line Data"
{
    elements
    {
        dataitem(ProdRtgLineExt; "Prod. Order Routing Line")
        {
            DataItemTableFilter = status = filter(<> "Finished");
            column(SystemRowVersion; SystemRowVersion) { }
            column(Status; Status) { }
            column(Prod__Order_No_; "Prod. Order No.") { }
            column(Operation_No_; "Operation No.") { }
            column(No_; "No.") { }
            column(Description; Description) { }
            column(Setup_Time; "Setup Time") { }
            column(Run_Time; "Run Time") { }
            column(Input_Quantity; "Input Quantity") { }
        }
    }
}
 
Is it possible to create a calculated column in a Query?  If so, how is this accomplished?
Categories:

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!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans