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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mathematical operations outside lists with report studio 1

Status
Not open for further replies.

gruposenda

Programmer
Jan 11, 2007
51
MX
Hi:
I have a list where there are miles and another where there are incomes in different concepts.
Can I use the values of both lists to create mathematical operations outside the lists? How can I do it ?
Thanks in advance
 
If more than one query is involved than performing calculations will not be allowed with data items from both queries.
You need a relationship between the 2 queries (which will produce a third query) to work on with both sides.
What do you mean with 'outside the lists'?

Ties Blom

 
Thank you very much.

In my report there are 2 queries and I need to do calculations with the data of these queries.
------------------------------------------
First Query : Miles 2008 Miles 2007
---------- ----------
999,999.99 999,999.99
------------------------------------------
Second Query : Income 2008 Income 2007
----------- -----------
Concept # 1 999,999.99 999,999.99
Concept # 2 999,999.99 999,999.99
------------------------------------------
Result expected : Factor 2008
-----------
Concept # 1 (Income 2008/ Factor 2008)
Concept # 2 ...
Concept # 3 ...

 
If one of the queries returns a single row, then you may (guessing here) get it to work if you allow crossjoins (look for query properties) in the report.

If both queries return multiple rows then going for crossjoins will get you wrong results.

This should really be tackled in the framework so you can fetch the data somehow in 1 query..

Ties Blom

 
Sorry

The calculation is (Income 2008 / Miles 2008)

And thanks again.


 
The tables involved in both queries have a different key, TABLE 1 (Miles) = (Company + Business Unit + Date) and the TABLE 2 (Expenses) = (Company + Business Unit + Date + Expense Type). Is there any suggestion to solve it using a stored procedure ?
Thanks
 
Depends on to which level you are going to roll-up the data.

If your facts are going to be aggregated against Company , business Unit and Year (based on date) then you can still define a third query as the resultset of the join between queries 1 and 2.

The cognos server will then perform the aggregation on the 2 seperate queries and the resultset can be joined (even as a full outer join) on the common dimensions Company , business Unit and Year.

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top