9 Replies Latest reply: Feb 12, 2018 9:40 AM by Sunny Talwar RSS

    Ignore selection of a Interval() and FirstSortedvalue functions

    Massimo Favaro

      Hello everyone.

      I am stuck with a problem.

      I have a table with a subscription date, unsubscription date and username.

      What I'd like to achieve is a measure that shows the user with the longest active subscription time.

      This one should be the correct formula:

      INTERVAL(unsubscribe_date - subscribe_date, 'd').

      No problem so far.

      What I'd want is this formula to ignore filters and selection: I read about set analysis but I don't understand how to use it in this case (if it has to be used in this case).

      I also want to display the username of the user with the longest subscription, and it should be:

      FirstSortedValue(username, INTERVAL(subscribe_date - unsubscribe_date))

      Once again, I don't know how to make this formula ignore selections and filters.

      Can anyone help me or give me a hint, please?