Hi, I have a report on demo_orders table. I have use the agregate action of the interactive report, in order to get the sum of the column order_total. Now I want to calculate the percentage of each order. How can i use the compute action of the interactive report to do this.
you cannot directly calculate the percentage for each order with the computation features of the IR. You would need to have the total over all orders as additional column in each record to build a computation on it. The IR does not support this out of the box.
But fortunately Oracle supports analytic SQL. Using this feature your request can be solved with a little extension to the SQL statement. Try this:
select order_id, customer_id, order_total, order_timestamp, user_id,
sum(order_total) over () sum_total