I have a grouped dataset. From the parent group down, the group names are:
Company > Plant > Details. In the end, I want to be able to take the sales of each plant and see what percentage it is of the entire company's sales. Let's say the company has a total sales of $500 and the sales of "Plant A" were $100 and "Plant B" sales were $400. I would image that I would need an expression at the Plant grouping level that was like:
It would be useful to see where are you using that expression to determine what is wrong here, but I think you can use this guide to get your desired result.
Create a tablix like this:
Note I've added
Plant fields as groups. Also I've deleted details group. Right click details and select
Delete group and set Delete group only option.
Now in the percentage column use the following expression:
=FORMAT( SUM(Fields!Sales.Value,"Plant")/SUM(Fields!Sales.Value,"Company") ,"P2" )
The sum of every plan divided by the sum of the whole company group. It is not necessary but I am using
FORMAT function to format the float value returned by the expression to percentage format using two decimal places.
It should show something like this:
UPDATE: Try scoping the sum to your specific group:
=sum(Fields!ActualCurrent.Value, "GroupBy")/sum(Fields!ActualCurrent.Value, "Company")
UPDATE 2: Format the cell to show decimal digits.
Use thiss expression:
=FORMAT( sum(Fields!ActualCurrent.Value, "GroupBy")/sum(Fields!ActualCurrent.Value, "Company"), "F2" )
It will format the value returned by the expression as a float with two decimal digits.
If you want to show the value in percentage format replace
F2 in the expression for
P2 (Percentage format with two decimal digits.)
Let me know if this helps.