Skip to Content
avatar image
Former Member

Sorting the Results of a Variable

Hello,

I want to sort in descending order the results of this variable.

If(IsNull([Installation Date]);DaysBetween([Customer want date];CurrentDate());DaysBetween([Customer want date];[Installation Date]))

The variable works fine, the problem is that I can not obtain a correct descending sort via the classic sort button.

I would appreciate any help,

Thank you in advance,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Oct 12, 2015 at 02:33 PM

    Hi,

    Share the screenshot of your webi report.

    Amit

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Denise,

      The other thing is that, seems the data type of the Nb Days object is String and no number, if I'm correct then, that's how the sort will work, it wouldn't consider 98 greater than 970, as 8 comes before 7 (desc order) and it doesn't care about the 0 after 8. That's just how alphabetical sort works. So, you need to convert Nb Days to a number data type using the tonumber() function.

      Thanks,

      Mahboob Mohammed