2 Replies Latest reply: Apr 24, 2014 7:27 AM by Manish Kachhia RSS

    Set analysis affected by filter


      Hi

       

      I have this expression:

       

      =sum(aggr(if(count({<FlagOneUsersCookie={1}, Month=,Year=,Quarter=>} distinct SessionIDINT) > 2,sum({<EventType={'Buy'}, Month=,Year=,Quarter=>} Price),0),CookieIDINT)) / sum(aggr(if(count({<FlagOneUsersCookie={1}, Month=,Year=,Quarter=>} distinct  SessionIDINT) > 2,1,0),CookieIDINT))

       

       

      Why is this getting affected when i click in my listbox on Month?

       

      It should not filter on Year,Month and Quarter

        • Re: Set analysis affected by filter
          Tresesco B

          Because your first Sum() doesn't include the set to avoid selection. You may try like:

           

          sum( {<Month=>} aggr(if(count({<

           

          Update: Infact you have to use set similarly in another Sum() that is used as denominator, like:

          / sum( {<Month=>}aggr

          • Re: Set analysis affected by filter
            Manish Kachhia

            Try this...

             

            =

            Sum({<Month=,Year=,Quarter=>}

              Aggr(

              If(Count({<FlagOneUsersCookie={1}, Month=,Year=,Quarter=>} Distinct SessionIDINT)>2,

              Sum({<EventType={'Buy'},Month=,Year=,Quarter=>} Price),

              0),

              CookieIDINT)

              )

              /

            Sum({<Month=,Year=,Quarter=>}

              Aggr(

              If(Count({<FlagOneUsersCookie={1}, Month=,Year=,Quarter=>} Distinct  SessionIDINT)>2,

              1,0),

              CookieIDINT))