Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
sigurdfjeld
New Contributor

Ignore selections aggr

Hi

I have a spesific KPI that requires an aggr to get the right result:

sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

sum({1< year = {'$(vYear)'}>} aggr(

if(year = $(vYear),

numberSomething)

,numberSomething,Dimension1,Dimension2,Dimension3))

But this wont ignore all selections the way i want.

Do anyone have any idea how to do this?

1 Solution

Accepted Solutions

Re: Ignore selections aggr

May be this:

Sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

Sum({1< year = {'$(vYear)'}>} Aggr(

If(Only({1} year) = $(vYear), numberSomething), numberSomething,Dimension1,Dimension2,Dimension3))

or

Sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

Sum({1< year = {'$(vYear)'}>} Aggr(

Only({1} If(year = $(vYear), numberSomething)), numberSomething,Dimension1,Dimension2,Dimension3))

or

Sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

Sum({1< year = {'$(vYear)'}>} Aggr(

Only({1} If(Only({1} year) = $(vYear), numberSomething)), numberSomething,Dimension1,Dimension2,Dimension3))

2 Replies
Chanty4u
Esteemed Contributor III

Re: Ignore selections aggr

Re: Ignore selections aggr

May be this:

Sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

Sum({1< year = {'$(vYear)'}>} Aggr(

If(Only({1} year) = $(vYear), numberSomething), numberSomething,Dimension1,Dimension2,Dimension3))

or

Sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

Sum({1< year = {'$(vYear)'}>} Aggr(

Only({1} If(year = $(vYear), numberSomething)), numberSomething,Dimension1,Dimension2,Dimension3))

or

Sum({1< year = {'$(vYear)'}, SomeDimension= {1}>} numberSomething)

/

Sum({1< year = {'$(vYear)'}>} Aggr(

Only({1} If(Only({1} year) = $(vYear), numberSomething)), numberSomething,Dimension1,Dimension2,Dimension3))

Community Browser