Announcements
cancel
Showing results for
Did you mean:
Contributor

## How do I correctly add an AND operator to my expression?

My expression

Avg({\$<GeoAreaName = P({<GeoAreaName = {'Belgium'}>})>}{\$<SeriesCode = P({<SeriesCode = {'AG_LND_FRST'}>})>}Value)

Is only giving me the result of the second "filter" and I don't know how to add a AND operator to this.

Labels (1)
• ### General Question

1 Solution

Accepted Solutions
Contributor II

you can try the following approach:

Avg({\$<GeoAreaName = P({<GeoAreaName = {'Belgium'}>}), SeriesCode = P({<SeriesCode = {'AG_LND_FRST'}>})>}Value)

This expression combines both conditions inside a single set analysis expression. The expression calculates the average 'Value' when both 'GeoAreaName' is 'Belgium' and 'SeriesCode' is 'AG_LND_FRST'. By placing both conditions within the same set analysis, the AND operator is implicitly applied.

6 Replies
Partner - Master

Avg({\$<GeoAreaName = {'Belgium'}, SeriesCode = {'AG_LND_FRST'} >} Value)

Contributor
Author

Thanks for the reply, unfortunately it still only gives the result of the first half.

Contributor II

you can try the following approach:

Avg({\$<GeoAreaName = P({<GeoAreaName = {'Belgium'}>}), SeriesCode = P({<SeriesCode = {'AG_LND_FRST'}>})>}Value)

This expression combines both conditions inside a single set analysis expression. The expression calculates the average 'Value' when both 'GeoAreaName' is 'Belgium' and 'SeriesCode' is 'AG_LND_FRST'. By placing both conditions within the same set analysis, the AND operator is implicitly applied.

Partner - Master