SSRS Show a percentage of a a total value

253 views Asked by At

I have a regular Table in SSRS. With 3 Groups...

(Parent) STORE - CLERK - PRODUCT (Child)

I have some regular aggregations. How many PRODUCTS Sold by a CLERK , How Many CLERKS Per STORE and Eventually How many PRODUCTS Per STORE

On top of the Regular Sums And Avgs, I need To Find Out The Percentage of PRODUCT (Type) Meaning a Particular value of that Group.

Example STORE 001 Has Sold 10 RADIOS (a PRODUCT) and There has Been 100 RADIOS sold by all Stores

So Basically What I Need is to show STORE 001 is Responsible for 10% of all RADIO Sales.

(A note: Ideally , I would Like to show this To adjust to the Data - So if I add new products It will group those as products (Naturally) but still give me those percentages)

1

There are 1 answers

4
SFrejofsky On
= fields!product.value / sum(fields!product.value)

in its most basic form you would want to use something like this.

The first will give you the total of the current row of data and the second will give you the total of all rows of that product.

Thus you would have 10 / 100 (per your example).

This is assuming that you have your data structured correctly. Depending on the structure of you report you may need to add a scope to your total summation to make sure that you are not totaling any other datasets that may reference the same product or field.

sum(fields!product.value, "--your dataset here--")