문제

If I want to then display each series' value as a percentage of the stack, how would I achieve this? If I use #PERCENT for the data labels, it gives me a percent of that series instead of a percent of that category (month). It seems like this should be a simple thing to do (percentage of the whole stack), but I haven't been able to make it work. If my data looks like this:

Month      Prod1| Prod2| Prod3
-----------------------------
January  |  5   |   5  | 5 
February |  10  |   15 | 10
March    |  10  |   0  | 20

What I am experiencing when I use #PERCENT is that the label for January/Prod1 is 20% (5 / (5 + 10 + 10)). What I want to display is 33% (5 / (5 + 5 + 5)) since January/Prod1 is 33% of the total products shipped in January.

도움이 되었습니까?

해결책

Of course, after a day of work I only solve my problem AFTER posting it to SO.

I found that I can use the following expression for the data labels to acheive this:

=Fields!series_value.Value/Sum(Fields!series_value.Value,"Chart7_CategoryGroupTotal"))

I just have to use the value of the specific series, divided by the total of these series values within the category scope.

다른 팁

Simple answer would Select chart series label and in Misc section of Properties change Format as ##.##'%'

You can use the second expression for the Percentage. But for better data presentation, I prefer to show both Count and Percentage.

=CSTR(FORMAT(Fields!Val1.Value,"#,#")) & 
" ("& ROUND(SUM(Fields!Val1.Value)/(SUM(Fields!Val1.Value)+SUM(Fields!Val2.Value))*100)
    & "%)"

Here is my image

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top