Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Market | Emp | City | City Emp |
---|---|---|---|
AA | 2 | NN | 9 |
BB | 3 | NN | 9 |
CC | 4 | NN | 9 |
DD | 5 | ZZ | 6 |
AA | 1 | ZZ | 6 |
Dear All,
Can we create a variable for 2 selection like :
1. vMarket= If(Match(Market,'AA','BB','CC') AND Match(City,'NN'),Emp)
2. vMarket= Sum({<Market= {'AA','BB','CC'},C]City={'NN'}>}City Emp)
If not plz tell me..How I can take the value of Emp in my expression as variable.. I have to take both the selection in one variable..
Plz reply soon..
A variable can only hold a single value at any one time. In your first example vMarket could equal 2, 3 or 4 so would not make sense.
Can you explain what you are trying to do?
Maybe you want to create a new calculated field instead? You would do that in the load script, e.g.
LOAD
Market,
Emp,
City,
[City Emp],
If(Match(Market,'AA','BB','CC') AND Match(City,'NN'), Emp, 0) as MyField
FROM
MyTable;
"MyField" would then contain a positive Emp value or zero if there is no match.
Not really sure what you are trying to achieve.
1. should work if there is only one possible value for both Market and City (e.g. you've selected one value in each field).
2. is not correct syntax, something like
=only({<Market= {'AA'}, City={'NN'}>} Emp)
should work, returning 2, regardless of selections in Market and City.
You can create a variable and the value of the variable can be varied based on the activation/deactivation of the other sheet objects.
For any sheet object in the actions>external>set variable, you can define the value of that variable.
In this way on activation of the sheet objects the value of the same variable can be changed.