Rollup Subtotals Problem

Results 1 to 2 of 2

Thread: Rollup Subtotals Problem

  1. #1
    Join Date
    Dec 1969

    Default Rollup Subtotals Problem

    I&#039;m working on a report that uses grouping with rollup to summarize some data. My data is arranged very similarly to the original grouping/rollup example I found, so I&#039;ll use that sample data in my question.<BR><BR>See:<BR><BR>In their example they are grouping products by categories. Each product has a unitprice, and the grouping/rollup function provides a subtotal of the unitprice data for each category.<BR><BR>So let&#039;s say in the Produce category we have Tofu (unitprice $23), dried apples (unitprice $53), and pears (unitprice $30). The automatically-generated subtotal for the produce category would then be $106. (Let&#039;s pretend only 1 unit of each product is in stock.)<BR><BR>I need to take this one step further. I need to fill a column with the percentage of the subtotal that each product represents. So the Tofu, at $23/unit, represents 21.7% of the total produce value of $106.<BR><BR>But getting this value would require somehow accessing the subtotal in that part of the grouping, and I have NO idea how to do that.<BR><BR>Any suggestions?

  2. #2
    Join Date
    Dec 1969

    Default Is it important... do this all in the query? Or would you mind doing it by coding in ASP/ASP.NET *after* doing the query?<BR><BR>And which is this for, ASP or ASP.NET (and what language)?<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts