Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying a graph that shows a sum

Status
Not open for further replies.

lucasnevant

IS-IT--Management
May 14, 2003
19
0
0
ES
Hi,

I'm having trouble to display a graph that shows the sum of some other fields.

Basically I calculate the total cost of a project as Sum of (<hours worked> by each resource grade * <cost rate> of the resource grade). The <hours worked> and the <cost rate> come from different queries.

I can create a graph that shows a bar for each resource grade, but what I would like to see is a bar showing the total cost of the project.

Any ideas???

Lucas Rodríguez
 
Hi,

Will the Total Cost Of The Project value remain the same for all the Resource Grade. If so, you could create a new Variable with appropriate Context and have that for the Graph.

Eg:
Sum of (<hours worked>) * <cost rate> ) In Report

Or would be easier if you provide some dummy data and what you want the other variables values to be.

Sri
 
Thanks Sridharan, Hope this helps:

The report is run for multiple projects, and has the following structure:

Section: Project title

Resource Grade Grade1 Grade2 Total
Actual Hours 0.5 29 29.5
Planned Hours 0 0 0
Cost Forecast 55.92 1,881.18 1,937.11


If I copy / paste the total cost forecast (1,937.11) outside the table, it increases it's value without apparent meaning.

 
The best way to do this is to run a union query. These can be built in the query panel.

Select resource_grade, sum(Actual_hours), sum(Planned_hours), sum(cost_forecast)
from &quot;Your tables&quot;
group by resource_grade
UNION
Select 'Totals', sum(Actual_hours), sum(Planned_hours), sum(cost_forecast)
from &quot;Your tables&quot;
group by 'Totals'

All you need to do is build an extra universe object that is defined as &quot;Totals&quot;.

Steve Krandel
BASE Consulting Group
 
Are you doing this for multiple projects? If so, that would be why your Total value is increasing when you copy/paste outside the table. Where are you creating the graphs (same report same section/different section, different report, etc.)?
 
Hi Lucas,

Click on the cell that is displaying the value 1937.11 and just move your mouse cursor over Formula Bar and you will get the exact Formula with the context. Now insert a cell within the section and paste that formula you are done.

Steve:-

I do agree that its best to do calculations if possible at the Universe Level but is there any specific reason why you are saying that Union is best in this case. Is it so it can be used for many reports or someother insight???

Sri
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top