Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 12, 2015 at 02:33 PM

    Hi,

    Share the screenshot of your webi report.

    Amit

    Add a 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

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.