Skip to Content
avatar image
Former Member

Sorting in WEBI

Hi

I have an infoobject which is in below format

A.1.00

A.1.10

A.1.20

A.1.100

A.10.00

A.10.10

A.10.20

A.10.100

A.11.00

A.11.10

A.11.20

A.11.100

When i don't do any type of sorting , it shows the output in the below format.

A.10.00

A.10.10

A.10.100

A.10.20

A.1.00

A.1.10

A.1.100

A.1.20

A.11.00

A.11.10

A.11.100

A.11.20

By this i can see the system is giving priority to 0 instead of '.'

I want output in the below format. Can anyone tell me how to achieve this??

A.1.00

A.1.10

A.1.20

A.1.100

A.10.00

A.10.10

A.10.20

A.10.100

A.11.00

A.11.10

A.11.20

A.11.100

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 12, 2017 at 01:57 PM

    follow these steps.

    Create Part1=ToNumber(Substr(Substr([Sort];3;Length([Sort]));1;Pos(Substr([Sort];3;Length([Sort]));".")-1))

    Part2=ToNumber(Substr(Substr([Sort];3;Length([Sort]));Pos(Substr([Sort];3;Length([Sort]));".")+1;Length([Sort])))

    First sort on part1 ascending and then part2 ascending.After that you can hide both.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      thank you. I have changed it to 4 and i got as desired.

      part 1 =ToNumber(Substr(Substr([Capital Budget - Key (Not Compounded)];4;Length([Capital Budget - Key (Not Compounded)]));1;Pos(Substr([Capital Budget - Key (Not Compounded)];4;Length([Capital Budget - Key (Not Compounded)]));".")-1))

      part 2 ==ToNumber(Substr(Substr([Capital Budget - Key (Not Compounded)];4;Length([Capital Budget - Key (Not Compounded)]));Pos(Substr([Capital Budget - Key (Not Compounded)];4;Length([Capital Budget - Key (Not Compounded)]));".")+1;Length([Capital Budget - Key (Not Compounded)])))

  • Jul 12, 2017 at 01:56 PM

    Hi Mohit,

    In webi you have 3 types of sort - ascending, descending and custom.
    Custom sort is where you can select whatever order you want for the values.

    If the number of values are not large, you can go with custom sort.

    But apart from that i don't really know any other workaround. Let see if anyone else has any ideas on this.

    -Abhilasha

    Add comment
    10|10000 characters needed characters exceeded