Skip to Content
avatar image
Former Member

Multiple Sorting in BEx Query Designer

I have a query I made in BEx that I would like to sort by two key fields (field A first, then Field B). I went to the "Display" property group and set the sort ascending option on field A and Field B. I re-ran the query and the results were sorted by field A, but field B remained unsorted:

Field A    Field B

2000          75Z

2000          36B

2050          25C

2050          20B

2060          30U

Do you know how I can get it to sort by both fields?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Oct 22, 2015 at 06:55 PM

    Hi Steve

    Leave Field A as it is by default which means choose As in Query for sorting property. For Field B, choose the option sort by ascending.

    It should work this way as when you don't do anything at all, the query will automatically choose As in Query and the results will be displayed in sorted way.

    I haven't tried this option, so it might end up in collapsing the field A. But you could give a try and let us know the output.

    On the other hand, when you leave both the fields without any setting for sort, doesn't it give you the result in proper way? The default sort property will be applied in the order you insert the fields in rows. Did you have any problems with this already?

    Regards

    Karthik

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 22, 2015 at 07:05 PM

    Sort Field B in descending will resolve your issue. Dont change sorting on field A.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Steve,

      sorting on field B doesn't work because, system will be sorting in ascending order combing both Field A and Field B together. which will sort only A ..

      Field B values are dependent on Field A, I will give an example of what I am trying to say.

      ex:  a transaction record with 2000(Field A)   75Z(Field B) has a value of 999(key figure)

      when you sort Field B

      2000 (Field A)   30U(Field B) --> what is corresponding key figure value should the system display? do you have any record with this combination in your cube? if no, then that is the reason, Field B never gets sorted.

      if , yes , then it should sort in a way what you are expecting. Thanks

  • Oct 27, 2015 at 02:56 PM

    Hi,

    Do you only have a handful of values on your FIELD B? If yes, try to add a SORTING characteristic on your FIELD B..Then sort your FIELD B based on that "sorting" characteristic..

    Regards,

    Loed

    Add comment
    10|10000 characters needed characters exceeded