May 18, 2009 at 2:55 pm
I am fairly new to SSRS and am struggling with this task. It was easy to do in Crystal but I'm unable to find a way to do this in SSRS.
I have a report that is using groups. I want to pull a percentage of detail record for one of the groups
For example my output should be like so
State Sales Revenue PCT of Revenue
Midwest Region
Minnseota 50 $100 50%
N. Dakota 25 $50 25%
Iowa 25 $50 25%
Totals: 100 $200 14%
West Region
California 100 $1000 80%
Washington 25 $250 20%
Totals: 125 $1250 86%
Grand Total: 225 $1450
May 18, 2009 at 6:00 pm
Hi Dennis,
In SSRS expressions, you can specify the scope for calculations. The scope can include the name of a table group, the name of the dataset, etc. Let's say your dataset is called dsDetails and your Region-level table group is called grpRegion. In your "Pct of Revenue" column, on the State row, use this expression: =Fields!Revenue.Value / Sum(Fields!Revenue.Value, "grpRegion"). On the Region-level group row, use this expression: =Sum(Fields!Revenue.Value) / Sum(Fields!Revenue.Value, "dsDetails"). Set the Format property on those cells to P0 if you want a quick way to format them as a percentage value with no decimals.
July 1, 2010 at 9:20 am
Perfect!
I had the same issue, good response 🙂
Regards
ld
Stoke-on-Trent
United Kingdom
If at first you don't succeed, go to the pub and drink away your current thought plan.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply