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

something weird with P(), at least I feel so.

I am just trying to demonstrate the use of P() using set analysis. and it works fine. But i am seeing something strange. The second text box here that contains the expression based on P() doesn't show any values on Reload, but if i clear the selection ( actually there is no selection when i reload) or if i do any selection on the screen then it shows the correct value. Can't understand this behaviour. Do I do anything wrong here?

To simulate: Save this file in your disk, click on the reload button, the second text box shows 0, now click on the "Clear selection", the second text box shows the correct value.

Thanks,

Ram

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Your expression :=Sum({1<player=P({$1<team={'delhi'}>}player)>} runs)

here, $1 (may be by mistake you wrote like this, but it has a meaning) -, means previous selection equivalent to pressing back button. Hence the behavior is so.

Remove $ sign, it would work as expected

View solution in original post

4 Replies
er_mohit
Master II
Master II

Try this

sum({<team=p({<player=,team={'delhi'}>})>}runs)

Not applicable
Author

Sorry Mohit. That is wrong. That is not what i am looking for. It gives me 9000 which is sum of all players from 'Delhi', but the very reason that i have used 'P()' is because i want to have the sum of all players that have played for delhi at some point.

tresesco
MVP
MVP

Your expression :=Sum({1<player=P({$1<team={'delhi'}>}player)>} runs)

here, $1 (may be by mistake you wrote like this, but it has a meaning) -, means previous selection equivalent to pressing back button. Hence the behavior is so.

Remove $ sign, it would work as expected

Not applicable
Author

Perfect. $1 was a typo. That is ought to be just 1 to ignore all selections. Thanks treseco.