3 Replies Latest reply: Feb 29, 2016 3:04 PM by Stefan Wühl RSS

    Set analysis - given a subset of users, count users

    Viktoriya Shulian

      I'm looking to write a set analysis that counts a number of users from a subset of users.

       

      Here's the data I'm working with:

      MaxScroll only populates if HitType is 'Scroll'

       

      UserIdPageHitTypeMaxScroll

      1

      www.blah.com/blah1Scroll0
      2www.blah.comScroll0.25
      2www.blah.comClick-
      3www.blah.com/blah2Scroll0.50
      4www.blah.com/blahScroll0.75
      4www.blah.com/blahClick-
      5www.blah.com/blah3Scroll0.25

       

      I need to count UserId's of users who scrolled more than 0, and who also clicked.

      count({<HitType = {Scroll, Click}, MaxScroll -= {0}>}distinct UserId) does not work, since MaxScroll is null in cases of 'Click' HitType, so it returns 0.

       

      Basically I need users who scrolled over 0 (easy =count({<HitType = {Scrolling}, MaxScroll -= {0}>}distinct UserId)) and of those users how many clicked. I'm not sure how to go about doing this.

       

      Thanks in advance.