Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Set analysis with variable

Hello I have a problem with an expression where I am trying to use set analysis for age

Here is my expression:

Count({$<Age = {"8"}>})$(Age)

with age being:

Age =Age(AttendanceDate1,BirthDate1)

Can anyone help me figure it out and quick answers would be much appreciated

                                     

6 Replies
cliff_clayman
Contributor II

Re: Set analysis with variable

Try changing {"8"} to just {8}

Not applicable

Re: Set analysis with variable

Hey Cliff I started off like that that is why I added the "" maybe if I tell you that I had a red line underneath the set analysis as shown

Qlikview problem example.png

cliff_clayman
Contributor II

Re: Set analysis with variable

What exactly is the problem?  If it is a syntax issue, try:

Count({<[Age] = {"8"}>}[Age]) or Count({$<[Age] = {"8"}>}$([Age]))

Re: Set analysis with variable

May be this:

Count({$<AgeIDField= {"=Age(AttendanceDate1,BirthDate1) = 8"}>}) AgeIDField)

Replace AgeIDField with whatever your trying to find the age of.

Not applicable

Re: Set analysis with variable

Hello Sunny sorry for the confusion but I want to just show the values for the Age 8 that is why I was using the variable I am not trying to work out the age as I have already got them I just want to limit it

Re: Set analysis with variable

Is Age field getting calculated in the script?