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

Sorting on a dimensional package

Started by cognos05, 18 Dec 2014 12:36:09 PM

Previous topic - Next topic

cognos05

I am showing reps in my column and time period  in columns with sales as Measures.

The expression for the rep given in the data item is

Order( Descendants( set(Region1,Region2),Reps),tuple(currentmember(Rep Hierarchy),[TimePeriod],[Sales],Desc)

SO I am getting the reps from 2 regions and then sorting descending.

The sorting is done by descending correctly, but the results are first the reps in region are sorted descending and displayed and then reps from region 2 are sorted descending and then displayed.

I wanted all the reps to be sorted descendaing based on the Sales value for the specified time period.

What am I missing here or how to achieve this.

Thanks,
Nithya

MFGF

Quote from: nithya1224 on 18 Dec 2014 12:36:09 PM
I am showing reps in my column and time period  in columns with sales as Measures.

The expression for the rep given in the data item is

Order( Descendants( set(Region1,Region2),Reps),tuple(currentmember(Rep Hierarchy),[TimePeriod],[Sales],Desc)

SO I am getting the reps from 2 regions and then sorting descending.

The sorting is done by descending correctly, but the results are first the reps in region are sorted descending and displayed and then reps from region 2 are sorted descending and then displayed.

I wanted all the reps to be sorted descendaing based on the Sales value for the specified time period.

What am I missing here or how to achieve this.

Thanks,
Nithya

Hi,

A few seconds reading the Information pane for the Order function will give you the answer :)

I have copied the description here, with the relevant section in bold...

order ( set_expression , value_expression [ , ASC|DESC|BASC|BDESC ] )
Arranges the members of "set_expression" according to their "value_expression" and the third parameter. ASC and DESC arrange members in ascending or descending order, respectively, according to their position in the set hierarchy. Then the children of each member are arranged according to "value_expression". BASC and BDESC arrange members in the set without regard to the hierarchy. In the absence of an explicit specification, ASC is the default.


Cheers!

MF.
Meep!