Export Utility (aka Business Activity Query) - Calculated Fields

We are dabbling in the export utility and have designed several data
exports. We are now interested in more complex queries such as the
ones Vantage will graph in areas like the Quality Performance
reporting. We had QA training several years ago and I believe the
instructor built a "Root Cause" query for us. There are several
lines in the query and all of them have calculations and
formatting. I contacted Epicor to learn more about these calculated
fields and they said they didn't have much information other than
the Business Activity Query class. We signed up for and took the
class but unfortunately the class only touched on the calculated
fields briefly and referred us to the Vantage help files. I've
looked in help but it hasn't really helped much. Does anybody know
of any other resources for learning this stuff? I was also directed
to Progress' website to download the 4GL programmers guide but it is
complete overkill for the few items we need to learn.

Here are a couple samples of what I'm talking about:

ymd(NonConf.SysDate) format "x(10)" column-label "Dimension Reported
fiscal(NonConf.SysDate) format "x(7)" column-label "Dimension Fiscal
Reported Date"
NonConf.ReasonCode column-label "Dimension Reason Code"


ScrapCost(if NonConf.InspectionPending then NonConf.Quantity else
0,buffer NonConf) format "$->>>,>>>,>>>,>>9.99" column-label "Fact
Pending Cost"
ScrapCost(NonConf.PassedQty,buffer NonConf) format "$-
>>>,>>>,>>>,>>9.99" column-label "Fact Passed Cost"
ScrapCost(NonConf.FailedQty,buffer NonConf) format "$-
>>>,>>>,>>>,>>9.99" column-label "Fact Failed Cost"

Many thanks for any help,

Bruce Brannan