Newbie question on calculated fields

1 view
Skip to first unread message

Torsten Becker

unread,
Jun 4, 2009, 11:19:05 AM6/4/09
to activewareh...@googlegroups.com
Hi,

I am using activewarehouse on rails 2.3.2 with MySQL on Mac OS.

I have tried to get the calculated_fields option work, but this seem
to be problematic.

Questions:

In the test examples, the calculated field is not in the schema, but
if I leave it out, the code will not run.
In the demo files, the calculated field is commented out..
If I include it in the schema, it is never displayed as a value,
always NULL

Does the calculated field work?

Torsten

Torsten Becker

unread,
Jun 6, 2009, 5:02:25 PM6/6/09
to activewareh...@googlegroups.com
Hi,

in the demo application, I finally got the calculated fields to run

if I replace

: agg_rec.gross_profit_dollar_amount / agg_rec.sales_dollar_amount

with

agg_rec
["pos_retail_sales_transaction_facts_gross_profit_dollar_amount_sum"]/

agg_rec["pos_retail_sales_transaction_facts_sales_dollar_amount_sum"]

the calculated_fields work without a problem, especially after
checking if div by zero is avoided.

Good work! The terms seem to be quite long....

Torsten
Reply all
Reply to author
Forward
0 new messages