Clustered Bar Chart - Show values as percentages of total

Stimulsoft Reports.WEB discussion
Post Reply
JHenn
Posts: 20
Joined: Fri Jun 01, 2018 9:23 pm

Clustered Bar Chart - Show values as percentages of total

Post by JHenn »

In a pie chart, each series value is presented as a percentage of the total.

We would like to do the same for a clustered bar chart. There is only a single series and it seems it should be doable. as the percentages would be the same as they are for the pie chart presentation. But I haven't figured out how. ('Show in Percent' changes the value formatting but does not present each value as a percentage of the total.) How can values in a clustered bar chart be shown as percents of the total series?
2019-07-01_15-15-19.png
2019-07-01_15-15-19.png (36.74 KiB) Viewed 4279 times
Thank you,
Judy Hennessey / PrecisionBI
JHenn
Posts: 20
Joined: Fri Jun 01, 2018 9:23 pm

Re: Clustered Bar Chart - Show values as percentages of total

Post by JHenn »

I think I figured out a solution. If there is a more elegant way, please let me know.

1. Create a databand to support the summary values to be used in a DIV expression (can be the same dataset as the chart).
2. Define the source at the Chart level (Chart/Data Source).
3. Under Series, set the Argument Data Column to the appropriate data column.
4. Also under Series, use Value / Value (instead of Value / Value Data Column) to create a DIV expression that provides the needed percentage. Mine:
{Div (Dataset.Charges,Totals.Sum(DataDataset,Dataset.Charges))*100}
5. Format that percentage. Under Labels, check Show in Percent and set the format (I used P1).
Judy Hennessey / PrecisionBI
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: Clustered Bar Chart - Show values as percentages of total

Post by Lech Kulikowski »

Hello,

Thank you for the provided solution.

Thank you.
Kiyaksar
Posts: 6
Joined: Sat May 01, 2021 5:53 pm

Re: Clustered Bar Chart - Show values as percentages of total

Post by Kiyaksar »

Hi,
I have the same problem,
Can you help me with an example or video tutorial?
thanks
Kiyaksar
Posts: 6
Joined: Sat May 01, 2021 5:53 pm

Re: Clustered Bar Chart - Show values as percentages of total

Post by Kiyaksar »

please help me
Explain more clearly number 4 in your Description,
this problem took me one week, but I couldn't solve it. What do u mean of 'DataDataset', where do I have to put this expression?
I have 3 columns (Mnth, DynamicCol, Counting) the third one is int and other columns are string
Lech Kulikowski
Posts: 6163
Joined: Tue Mar 20, 2018 5:34 am

Re: Clustered Bar Chart - Show values as percentages of total

Post by Lech Kulikowski »

Hello,

Means the data source name. You should use your data source name instead of the "Dataset" in that expression.

Thank you.
Kiyaksar
Posts: 6
Joined: Sat May 01, 2021 5:53 pm

Re: Clustered Bar Chart - Show values as percentages of total

Post by Kiyaksar »

Thank u 4 ur answer
it was solved
Andrew
Posts: 4104
Joined: Fri Jun 09, 2006 3:58 am

Re: Clustered Bar Chart - Show values as percentages of total

Post by Andrew »

Okay, great!
Post Reply