If you are unable to create a new account, please email support@bspsoftware.com

 

Report Studio- can we insert different calculations for each row of a column?

Started by ey, 15 Mar 2007 09:46:45 AM

Previous topic - Next topic

ey

In Report Studio, is it possible to insert different calculations for each row of a particular column?Ã, 
We have tried query calculations and data items. Thanks for any help.

MFGF

Hi,

No - your calculations will apply to all rows.  You can achieve something similar by coding a calculation using an if/then/else construct or a case statement to do different things for different rows.  Will this give you what you need?

Regards,

MF.
Meep!

ey

This is very helpful, thank you.

If I am using an If/then or a case statement how do I reference what I want - e.g., not just a particular column, but also a particular cell (row/column combination).

I have measures on the rows, with time periods and calculations on the columns.

Cognerd

Hi,

You might try to put the different calculations into your query, and then conditionally show the value from a particular one based on your logic.


kmuller

Have you tried unlocking your cells and dragging the calcs in to that unlocked field.  Not sure if it will work, but it may be worth a try.

-k

ey

We have tried unlocking and then dragging in a data item with calc; we also tried copying in a query calc. In the design page it looks like it will work, but then we get blank cells.

jiunshen

for my experience, I will use several list tables to do the different calculation in row level. So each list table will only show one row and the report will be combined by several list tables.

hope this answer your question,

jiunshen

Veekaygee

I agree with jiunshen. Unless you have a definite criteria which can be coded in to a condition, multiple lists will be the answer. You will need quite a bit of formatting to make the lists look like one list.

almeids

Probably too late to be of any help here, and I should confess I don't understand the original issue and am not running Cognos 8 yet, but Veekaygee's last comment prompted me: in the past I have attempted "quite a bit of formatting" to make multiple lists look like one, and I found it vastly preferable to make multiple result sets look like one, by unioning them, and maintaining a single list instead.

ey

Thank you for the reply - we are still working on this issue.

Would you expand on the preferred approach that you have mentioned?

almeids

Sure, but you'll need to translate from Reportnet concepts to Cognos 8...
Get your queries (actually, the Cognos 8 equivalent of their Tabular Models if there is one) similarly shaped, with the same number/type/order of data items.  This shouldn't be difficult if they were a single query to begin with, though if you have intermediate calculation data items in the tabular data you may have to add some dummy items to one or the other to make the result sets' layouts match.  Once you've done that, create the Cognos 8 equivalent of a UNION tabular set to merge the result sets in a single query which will supply the data to your list.

In ReportNet, assuming Query 1 and Query 2 displayed in List 1 and similarly formatted List 2, the specific steps would be:
- cut Query 1's Tabular Model
- drag a Tabular Set into Query 1
- paste Query 1's Tabular Model you cut into the Tabular Set (left)
- cut Query 2's Tabular Model
- paste Query 2's Tabular Model into the Tabular Set (right)
- Delete Query 2 and List 2

You would need to repeat/nest unions for each differently-calculated row you want to put together (expanding the Reportnet example, Tabular Set 1 would contain Tabular Model 1 and Tabular Set 2, which would contain Tabular Model 2 and Tabular Set 3, which would contain Tabular Model 3... etc.)

HTH
Steve