Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Creator II
Creator II

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

Not applicable
Author

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
Creator II
Creator II

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

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

sunny_talwar

May be this:

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

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

Not applicable
Author

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

sunny_talwar

Is Age field getting calculated in the script?