This probably is easy, but I haven't seen a good way to
do it yet.
I have a stored procedure that returns a numer or rows
that get grouped. Details are available if the person
expands the tree. I would also like to add the
percentage of total records as part of the display, but
can not figure out how to get a "total record count" to
work within the grouping to give me the appropraite
percentage.
What I am trying to do is this:
Custom Num Sales Percentage of Total Volume
+Cust A 25 25%
+Cust B 35 35%
+Cust C 40 40%
How can I keep and access a static count of the number of
records being returned by the dataset without having to
pass that as a calculated field in the stored procedure?
Thanks=Sum(Fields!NumSales.Value)/Sum(Fields!NumSales.Value,"Dataset1")
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"David" <anonymous@.discussions.microsoft.com> wrote in message
news:38c101c46a9d$60568870$3a01280a@.phx.gbl...
> This probably is easy, but I haven't seen a good way to
> do it yet.
> I have a stored procedure that returns a numer or rows
> that get grouped. Details are available if the person
> expands the tree. I would also like to add the
> percentage of total records as part of the display, but
> can not figure out how to get a "total record count" to
> work within the grouping to give me the appropraite
> percentage.
> What I am trying to do is this:
> Custom Num Sales Percentage of Total Volume
> +Cust A 25 25%
> +Cust B 35 35%
> +Cust C 40 40%
> How can I keep and access a static count of the number of
> records being returned by the dataset without having to
> pass that as a calculated field in the stored procedure?
> Thanks
>|||Hi Chris,
Thanks for the response, and I guess my example is not as
clear as it could be through over simplification.
I am trying to do percentage of groups of records based
on not the sales/or data values, but number of records.
So if you look at my example, consider it as number of
sales is the number of records or detail items, and I
want to do that as a percentage of total records
returned, so nothing that I have in the dataset as a
field value, but the overall record count.
A more specific example. I have a record set returning
634 records. One group that gets rolled up has 14
records, So I am trying to do at the group footer =RecordCount()/TotalRecordCount but I don't know where to
capture this.
A work around is just adding a column with 1 in it to the
record set and doing you method, but I am trying to avoid
that.
>--Original Message--
>=Sum(Fields!NumSales.Value)/Sum(Fields!
NumSales.Value,"Dataset1")
>--
>This post is provided 'AS IS' with no warranties, and
confers no rights. All
>rights reserved. Some assembly required. Batteries not
included. Your
>mileage may vary. Objects in mirror may be closer than
they appear. No user
>serviceable parts inside. Opening cover voids warranty.
Keep out of reach of
>children under 3.
>"David" <anonymous@.discussions.microsoft.com> wrote in
message
>news:38c101c46a9d$60568870$3a01280a@.phx.gbl...
>> This probably is easy, but I haven't seen a good way to
>> do it yet.
>> I have a stored procedure that returns a numer or rows
>> that get grouped. Details are available if the person
>> expands the tree. I would also like to add the
>> percentage of total records as part of the display, but
>> can not figure out how to get a "total record count" to
>> work within the grouping to give me the appropraite
>> percentage.
>> What I am trying to do is this:
>> Custom Num Sales Percentage of Total Volume
>> +Cust A 25 25%
>> +Cust B 35 35%
>> +Cust C 40 40%
>> How can I keep and access a static count of the number
of
>> records being returned by the dataset without having to
>> pass that as a calculated field in the stored
procedure?
>> Thanks
>>
>
>.
>|||If you're just after a count of rows, you could do this:
=CountRows()/CountRows("Dataset1")
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"Dave" <anonymous@.discussions.microsoft.com> wrote in message
news:398701c46b2d$f5b4e570$3a01280a@.phx.gbl...
> Hi Chris,
> Thanks for the response, and I guess my example is not as
> clear as it could be through over simplification.
> I am trying to do percentage of groups of records based
> on not the sales/or data values, but number of records.
> So if you look at my example, consider it as number of
> sales is the number of records or detail items, and I
> want to do that as a percentage of total records
> returned, so nothing that I have in the dataset as a
> field value, but the overall record count.
> A more specific example. I have a record set returning
> 634 records. One group that gets rolled up has 14
> records, So I am trying to do at the group footer => RecordCount()/TotalRecordCount but I don't know where to
> capture this.
> A work around is just adding a column with 1 in it to the
> record set and doing you method, but I am trying to avoid
> that.
>
> >--Original Message--
> >=Sum(Fields!NumSales.Value)/Sum(Fields!
> NumSales.Value,"Dataset1")
> >
> >--
> >This post is provided 'AS IS' with no warranties, and
> confers no rights. All
> >rights reserved. Some assembly required. Batteries not
> included. Your
> >mileage may vary. Objects in mirror may be closer than
> they appear. No user
> >serviceable parts inside. Opening cover voids warranty.
> Keep out of reach of
> >children under 3.
> >"David" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:38c101c46a9d$60568870$3a01280a@.phx.gbl...
> >> This probably is easy, but I haven't seen a good way to
> >> do it yet.
> >>
> >> I have a stored procedure that returns a numer or rows
> >> that get grouped. Details are available if the person
> >> expands the tree. I would also like to add the
> >> percentage of total records as part of the display, but
> >> can not figure out how to get a "total record count" to
> >> work within the grouping to give me the appropraite
> >> percentage.
> >>
> >> What I am trying to do is this:
> >>
> >> Custom Num Sales Percentage of Total Volume
> >> +Cust A 25 25%
> >> +Cust B 35 35%
> >> +Cust C 40 40%
> >>
> >> How can I keep and access a static count of the number
> of
> >> records being returned by the dataset without having to
> >> pass that as a calculated field in the stored
> procedure?
> >>
> >> Thanks
> >>
> >>
> >
> >
> >.
> >
No comments:
Post a Comment