Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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

View solution in original post

2 Replies
tresesco
MVP
MVP

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

MK_QSL
MVP
MVP

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))