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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Criteria

Hi

I am averaging a euro value across a variable defined set, in general this works well:

=Avg( {$<[Year]={$(varReportYear)}, [Code]={$(varTitleYear)}>} [Total Eur])

However, when I add a third variable which is string based;  I get a result if the value is a single word e.g. "Brown" but don't if it contains spaces as in "Smith - London"

Any ideas would be helpfull.

Jim

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have you tried enclosing the string based variable in single quotes? Like

=Avg( {$<[Year]={$(varReportYear)}, [Code]={$(varTitleYear)}, [StringField] = {'$(varString)'} >} [Total Eur])

View solution in original post

2 Replies
swuehl
MVP
MVP

Have you tried enclosing the string based variable in single quotes? Like

=Avg( {$<[Year]={$(varReportYear)}, [Code]={$(varTitleYear)}, [StringField] = {'$(varString)'} >} [Total Eur])

Not applicable
Author

Thank You, Spot On.