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

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Calculated Data Item

Started by sanchoniathon, 12 Jul 2010 10:02:54 AM

Previous topic - Next topic

sanchoniathon

Hi to all,

We want to be able to calulate [SALES] of a certain sub-department divided over the total of that DEPARTMENT.

We need to have this done dynamically depending on the values of the SUB-DEPARTMENT and DEPARTMENT parameters choosen by the user.

Is this possible or not ? This is what i think might do what i want but can't seem to make it work correctly:

currentMember ( [Cube_Sales].[ProductDimension].[Produit_Level] )
/
parent ( currentMember ([Cube_Sales].[ProductDimension].[Produit_Level] )

Thanks !

cognos_share

#1
Hi

I am not sure about your logic, but if I understand what you are looking for is in Reports Studio then here is what i suggest...

Create a  data item (DT1) that picks up the parameter and calcs Total(Department)

and another data item (DT2) that picks ups the parameter for sub-department and calculate Sub-department/DT1.

Bring both data items on the page and in the prompt page pass on the parameters for Department and Sub-department.

laks

I am not sure about better solution, on top of my mind i would think of creating two different queries Query1 which contains department and sub-department parameters and Query2 which contains only department parameter. Join these two query's to create a main query which contains [Query1].[SALES]/[Query2].[SALES]

sanchoniathon

Hi to all,

Did not tested what was suggested but with i finally got to get what i wanted.
This is what needs to be in my Data Item expression:

(tuple ( [Cube_Sales].[ProductDimension].[Produit_Level] ->?pVision?, [Sales] ) /
tuple ( parent ( [Cube_Sales].[ProductDimension].[Produit_Level] ->?pVision?), [Sales] ) ) *100

The important portion of this expression is the parent() function.

Thanks anyhow !