bar chart showing sum of value per criteria

Stimulsoft Reports.WEB discussion
Post Reply
ChrisV
Posts: 2
Joined: Mon Jul 12, 2010 3:07 pm
Location: Canada

bar chart showing sum of value per criteria

Post by ChrisV »

Hello,

I am trying to create a bar chart (clustered columns) but I'm struggling to aggregate data per category.
I have a set of values per market:

MARKET COST
-----------------------
NE 200
NW 100
NW 150
SW 100
SW 300
SW 100

I' trying to find a way to display one bar per market with sum of cost per market, such as:

MARKET COST
-----------------------
NE 200
NW 250
SW 500

Argument Data Column is {Projects.Market}
Value Data Column is {Projects.Cost}

What should I indicate as Argument? I have tried many things but all my tests end up in error or do not change anything.


Ivan
Posts: 960
Joined: Thu Aug 10, 2006 1:37 am

bar chart showing sum of value per criteria

Post by Ivan »

Hello,

Please add the datasource of type "Data from other Data Source":
In the DataSource tab select "Projects" datasource.
In the Group tab add group, in the Column combobox select "Projects.Market".
In the Results tab add: column "Cost", AggregateFunction "Sum".
Then use this datasource in your chart.

The sample report in attachment.

Thank you.
Attachments
492.DataSource sample.mrt
(17.47 KiB) Downloaded 345 times
ChrisV
Posts: 2
Joined: Mon Jul 12, 2010 3:07 pm
Location: Canada

bar chart showing sum of value per criteria

Post by ChrisV »

Thank you, I got it work, but I have noticed that if you keep the field as created (in my case, "Cost.Sum"), it does not work. It works however if the dot is removed (e.g. with "CostSum"), not sure if this is a bug but I thought you should know.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

bar chart showing sum of value per criteria

Post by Vladimir »

Hello,

Please tell us what version of the product are you using? Recently this error has been fixed. Try the latest prerelease build.

Thank you.
Post Reply