cancel
Showing results for 
Search instead for 
Did you mean: 

How to order a structure element

former_member195631
Participant
0 Kudos

Hi all

I have a model in Design studio over a Bex query

The query has 2 structures

Columns: sales QTY

Rows: a structure with selections of customers

             Sales QTY

Cust a      100

Cust b      200

Cust c      250

I want to be able to sort the rows by Sales QTY so that it would look like this:

             Sales QTY

Cust c      250

Cust b      200

Cust a      100

I cannot use a condition as it doesn't allow me to use "Top N" on a structure

And in Design studio, I also cannot sort in the initial view

Any suggestions would be great

Shlomi

Accepted Solutions (0)

Answers (4)

Answers (4)

MustafaBensan
Active Contributor
0 Kudos

Hi Shlomi,

I have two suggestions:

1)  If each structure element contains only a single customer, then include the customers in the filter section of the BEx Query, add the Customer dimension to the rows section and sort on Sales Qty;

2)  If each structure element contains multiple customers then group the customers in a BW hierarchy, add the hierarchy to the rows section of the BEx Query and sort on Sales Qty.

Regards,

Mustafa.

Former Member
0 Kudos

Hi Shlomi,

As far as I know I don't think we can sort the elements of a structure like we can sort members of a dimension. When we have two structures i.e. Key Figure and Characteristics structures in a BEx query, a table with fixed cell definitions is created.

Can't you add the Customer dimension instead of structure and just filter to show the required customers? If you are able then sorting shouldn't be a big deal.

Regards,

Swapnil Koti

Former Member
0 Kudos

Hi Shlomi,

Have you tried the following script:


DS_1.sortByMeasure(<Technical name of your measure>, false);

When I have had structures in my query, I have often found sorting in the initial view does not work properly. Using the above script on Startup of the application usually works (This may have a slight overhead on startup, however).

Thanks and Regards,

Eshwar Prasanna

chandrasekhar6
Participant
0 Kudos

Hi Shlomi,

Can you please check once the following URL,

Problems with the CrossTable Function &quot;Sort&quot; | SCN

Thanks.

former_member195631
Participant
0 Kudos

Hi chandra

thanks for the reply, but it doesn't seem to relate to my issue

Shlomi