Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filtering expresions using $

Hi,

If I have a sales expressions and I define:

sum( {$} sales)

then sales are filtered by current selection. My question is: Can  I filter only by the selections done in one field??

That is, something like that:

sum( {$<city = city>}  sales)

Ii doesn't work, because I want the expression filtered only by city, but If I make selecctions by other fileds , this selections affects the expression

Can anybody help me?

Thanks in advance

3 Replies
Gysbert_Wassenaar

Yes, like this: sum( {1<city = P(city)>}  sales)


talk is cheap, supply exceeds demand
Colin-Albert

You can find more information on set analysis here.

Set Analysis: syntaxes, examples

sunny_talwar

You can also try this:

Sum({1<city = $::city>} sales)

This is slightly different then the syntax provided by Gysbert.

Gysbert's solution will show all possible values of city. For instance if you make a selection in date field and for that particular date there are only 2 cities available, you will see the Sum(Sales) for all dates, but only those two cities. Where as the one provided above will only filter based on direct selection in city field.