COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 29 Apr 2016 06:50:30 PM

Title: using attribute in report studio for ptq calculation
Post by: cognos05 on 29 Apr 2016 06:50:30 PM
I have a dimensional package report with

Region->state->city nested in rows.

I am having Percentage to Quota calculation in column and this has calculation to show percentage to quota for the city only if its attribute value is true
                                                                      PTQ
East-> New York ->City 1                               0
                                City 2                              57.15%
                                Total                                57.15% 
           Total

How to achieve this calculation because current member will give cities , states and region and filter should be on cities and based on its attribute value.
I have never used attribute in the report, assume my value was loaded under cities short description, how would I check here in the query calculation,

Thanks,
Nithya
Title: Re: using attribute in report studio for ptq calculation
Post by: cognos05 on 30 Apr 2016 06:14:02 PM
Hi,
I was able to use a calculation in rows like
Using attribute on row filter.

Filter(city level , where attribute shortdescription of city is True) and it filters my city based on attribute value and it looks good.


Now

Say I have 3 levels nested from same dimension in rows and on column I have calculation Percentage to Quota - Revenue/Quota.

I want to apply this calculation only to cities which have an attribute value of True and for rest put 0.
So how should I use my attribute value calculation on the column PTQ.


East     NewYork    City 1(True)          87.5%
                             City 2(False)           0
                             City 3(True)            57.65%

             Total                                       76.5%


How should be the calulation on ptq column :
If(Tuple(currentMember(Region Hierarchy),attribute value of city) = 'False')
Then (0)
Else
(Revenue/Quota)

But this gives error like cannot compare string value on tuple.

Can anyone suggest me on how to achieve this calculation.

Thanks,
Nithya




Title: Re: using attribute in report studio for ptq calculation
Post by: cognos05 on 03 May 2016 07:57:57 AM
Can anyone provide your suggestions on this .

I wanted to show the cities based on its parents attribute value.

Example

East Newyork   City 1   
           TRUE     City2

East NewJersy  City3
           False      City4


SO Now on City Data item Nested in Query - >  I will write a filter like

FIlter(City Level,   Condition to check if CurrentMembers parent attribute value is true , then show the cities .

Thanks,
Nithya
Title: Re: using attribute in report studio for ptq calculation
Post by: cognos05 on 10 May 2016 06:07:01 PM
Hi Guys,

Has anyone have any suggestions on the below issue. I could not find a solution, any help is appreciated.
Title: Re: using attribute in report studio for ptq calculation
Post by: LFC on 12 May 2016 09:57:38 AM
Nithya,

try using

filter ( currentMember(Region Hierarchy)  ,  <attribute value of city> = 'False' )

instead of

Tuple(currentMember(Region Hierarchy),attribute value of city) = 'False'

Title: Re: using attribute in report studio for ptq calculation
Post by: cognos05 on 12 May 2016 03:25:33 PM
Filter( City Level,check the attribute value of its parent not working)
How will I check the members parents attribute value, attributes are static and I am not able to filter the city based on its parent states attribute value.

Please advise.