Chart issue, 2 lines, one is the total and one is a specific company
Hi
I have a dataset with a list of companies and what they have sold this year every month.
Now I want to take a simple line graph, X=the months and Y=money.
One line is the TOTAL, what ALL companies have sold this year and every month.
The other line is a specific company ... to make it easy I will hardcode it for now as CompanyA (I will paramatise it later on).
What I do is take a simple line graph, put months on the categories axel, put Value (this is what they have sold monthly) on the data fileds area ... and then I'm not sure wether to put Company in the series field ...
What do I do? It's so simple but I'm stuckjea
November 17th, 2010 10:14am
What I wanna do is ...
=Sum(Fields!Value.Value) ... for Fields!Company.Value = "CompanyA"
I have drop 2 sets of [Sum(Value)] in the chart zone "Drop data fields here".
One of them is suppose to take everything and the other just the CompanyA.
How do I do this?
Please help?jea
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 3:19am
Hi,
I am assuming you have 3 fields in your dataset:
Company,Month, Value
1) Take a line graph, set its Dataset Name Property to your dataset.
2) In your categorygroup, group on Months.
3) In your value axis, give it value expression as Sum(Fields!Value.Value).
4) In your series group, group on company.
And here you go, you are done for furthur look n feel changes.
Thanks,
Manoj
Please mark as answer if it you are satisfied.
November 18th, 2010 4:51am
Thanks Manoj ... but I see that I didn't explain my self correctly.
What I want to do is:
1. A line chart
2. X-axis ... the Months of a chosen year (by parameter and this works)
3. Y-axis ... the value
So far so good ...
4. Two lines: a- CompanyAs values each month and b-ALL companies in the dataset values for each month. Kind of a Total versus a specific CompanyA to see how this CompanyA stands against all others.
This is what I can't do.
If I do it like you said Manoj, I get, 10 lines (assuming I have 10 companies in the dataset) ... and I only want two lines.
So the question remains ... how do I filter out in Sum(Fileds!Value.Value) a specific Company?
Next question will be ... how do I filter out more parameters from the dataset, say productgroup and so on?
I'm thinking something i VB and the Expression were =Sum(Fileds!Value.Value) resides. Right?
jea
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 5:13am
If you are using SQL, then this can be easily done with the help of a query as shown below
select Year, Month, Company,Sales
from TblA
where Company=@PAR_Company
union all
select Year, Month,'Total' as Company, sum(Sales) as Sales
from TblA
group by Year, Month
Now you can use this in the chart and you will be getting the required company (from parameter) and the totalCheers,
Jason
P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
November 18th, 2010 5:48am
Thank you very much!! Work perfactly. Didn't want to change my DS as I wanted to use it for multiple purposes ... but I see now that this time I have to have different datasets for different items on the report.
Now to the next question:
If I want to calculate the Share that CompanyA has among all the other ones ... how do I go about doing that?
That is ... CompanyA Sales / Total Sales.
If I have the dataset that the SQL code above generates ... I can't really use it now can I?jea
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 8:33am
Thank you very much!! Work perfactly. Didn't want to change my DS as I wanted to use it for multiple purposes ... but I see now that this time I have to have different datasets for different items on the report.
Now to the next question:
If I want to calculate the Share that CompanyA has among all the other ones ... how do I go about doing that?
That is ... CompanyA Sales / Total Sales.
If I have the dataset that the SQL code above generates ... I can't really use it now can I?jea
November 18th, 2010 8:33am
can you give the full requirements please, so that I can suggest a method for all requirements together? :)
And where do you want the share, in a separate table or a chart. etc?Cheers,
Jason
P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 8:38am
can you give the full requirements please, so that I can suggest a method for all requirements together? :)
And where do you want the share, in a separate table or a chart. etc?Cheers,
Jason
P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
November 18th, 2010 8:38am