Hi!
I have data on a report where I am subtotalling by Items on an invoice. So,
my subtotal has the sum of all the invoices for that item.
I also want to do a calculation that will calculate for each item (that is
summarized) % of total sale for all items. Presently, my totals for all items
are in the Table Footer.
Item Amount Percent of Total
A 10 (subtotal) 10/15 =67%(ie divided by report
total)
B 5 (subtotal) 5/15 =33%
Report Total = 15
How do I do this?
Thanks
Ranjit CharlesHi,
You need to have a report variable which stores the grand total already or a
select statement which stores the grand total. Then you can use this variable
to find out the percentage. You can have a dataset created for this select
alone which will find out the grand total and use the dataset for percentage.
Regards
Amarnath
"Ranjit Charles" wrote:
> Hi!
> I have data on a report where I am subtotalling by Items on an invoice. So,
> my subtotal has the sum of all the invoices for that item.
> I also want to do a calculation that will calculate for each item (that is
> summarized) % of total sale for all items. Presently, my totals for all items
> are in the Table Footer.
> Item Amount Percent of Total
> A 10 (subtotal) 10/15 =67%(ie divided by report
> total)
> B 5 (subtotal) 5/15 =33%
> Report Total = 15
> How do I do this?
> Thanks
> Ranjit Charles|||Or you can sum the total amount and put it in to a new value field for the
select statement...
e.g. select *, (select sum() ... from ...) "GrandTotal" from ...
which obviously means you calculate the total for every line but SQL is
pretty efficient.
Craig
"Amarnath" <Amarnath@.discussions.microsoft.com> wrote in message
news:4977EB5C-C4A7-4109-B61E-F3D9B059DE28@.microsoft.com...
> Hi,
> You need to have a report variable which stores the grand total already or
> a
> select statement which stores the grand total. Then you can use this
> variable
> to find out the percentage. You can have a dataset created for this select
> alone which will find out the grand total and use the dataset for
> percentage.
> Regards
> Amarnath
>
> "Ranjit Charles" wrote:
>> Hi!
>> I have data on a report where I am subtotalling by Items on an invoice.
>> So,
>> my subtotal has the sum of all the invoices for that item.
>> I also want to do a calculation that will calculate for each item (that
>> is
>> summarized) % of total sale for all items. Presently, my totals for all
>> items
>> are in the Table Footer.
>> Item Amount Percent of Total
>> A 10 (subtotal) 10/15 =67%(ie divided by report
>> total)
>> B 5 (subtotal) 5/15 =33%
>> Report Total = 15
>> How do I do this?
>> Thanks
>> Ranjit Charles
No comments:
Post a Comment