COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS Transformer => Topic started by: jatin.popat on 04 Mar 2009 03:08:21 AM

Title: Sorting A Dimension
Post by: jatin.popat on 04 Mar 2009 03:08:21 AM
Hello,

I having following Values in a particular dimension :
A,1,2,3,4,5,0,-1,-2,-3,-4,-5

As per Client Requirement, It should be displayed in the cube as :
-5
-4
-3
-2
-1
0
1
2
3
4
5
A

I have tried both the numeric as well Alphabetic sorting but i am not getting the required output.
Kindly provide some suggestions regarding this issue....................

Thanks in advance............
Title: Re: Sorting A Dimension
Post by: SanderH on 04 Mar 2009 03:11:49 AM
The easiest solution is to add a column in your data source which contains the sort order. Use this column in your Transformer model to set up the correct sorting order.
Title: Re: Sorting A Dimension
Post by: jatin.popat on 04 Mar 2009 03:27:54 AM
i should create this sorted column in FM model or Transformer Model ?
Title: Re: Sorting A Dimension
Post by: SanderH on 04 Mar 2009 06:38:23 AM
First you need to add this in your data source and then include it in your Transformer model. Then you can use it for sorting the items in the dimension.
Title: Re: Sorting A Dimension
Post by: jatin.popat on 05 Mar 2009 01:17:40 AM
I solved this problem using hard-coding in the transformer model........

...>> Created a new calculated column in the Transformer model using
       
        if 'A' then '6'

Ans then used this calculated column to sort that particular dimension.....