Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Set analysis affected by filter

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

2 Replies
MVP
MVP

Re: Set analysis affected by filter

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

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

Community Browser