Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

                                     

Labels (1)
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
MVP
MVP

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

Is Age field getting calculated in the script?