Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I have the following data set:
Project | Cost1 | Cost2 | Cost3 |
---|---|---|---|
A | 1 | 5 | 6 |
B | 3 | 3 | 6 |
C | 1 | 4 | 3 |
D | 3 | 4 | 5 |
E | 4 | 6 | 4 |
I want a line chart where the X-axis are Cost1, Cost2, Cost3, and the line connecting each Project's Cost is shown.
Any help would be appreciated.
Ok, your data needs to be in the form
Project, Cost, Value
A, Cost1, 1
A, Cost2, 5
...etc
Then in your chart you add Cost as first dimension, Project as second dimension and sum(Value) as expression.
If your data is in the form you posted above then you first need to transform it in the script with the crosstable function
Data:
crosstable(Cost, Value,1)
load
Project, Cost1, Cost2, Cost3
from ...somewhere...;
Since you're talking about a line chart it sounds like all you need to do is change the Orientation on the Style tab. If that's not the case I obviously don't understand what you want. Can you show what the result should look like? Also are cost1, cost2 and cost3 fields? If they are expressions can you post the expressions too.
Thanks for your response.
This is what I want:
Of course the actual data that I am working with is more complex. There are a larger number of Projects and Costs.
Edit: The above image I added was achieved with Excel by simply switching the Row and Column.
Ok, your data needs to be in the form
Project, Cost, Value
A, Cost1, 1
A, Cost2, 5
...etc
Then in your chart you add Cost as first dimension, Project as second dimension and sum(Value) as expression.
If your data is in the form you posted above then you first need to transform it in the script with the crosstable function
Data:
crosstable(Cost, Value,1)
load
Project, Cost1, Cost2, Cost3
from ...somewhere...;
Thank you very much. It worked perfectly.