Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to understand how p() works.
Is Sum({1<[Date]=P([Date]), [Hour]=P([Hour])>} [Value]) the same as Sum([Value])?
Either I mis-read your reply, or you've edited it (?)
Yes - "ignore all selections except possible values in Date and Hour".
Flat table - I assume so too.
The pdf in this link explains Set Analysis,
Set Analysis: syntaxes, examples
But in essence the 1 ignores any selections made and the P() returns all the possible values.
Yah, I guess that's my question - by ignoring all selections am I already including all possible values?
Basically is [Date]=P([Date]) a subset of all my possible selections based off what I have selected - I am curious if the expression I first wrote is redundant?
It is not the same. It will sum up the values for Date and Hour which are affected by selections in other fields.
So the expression is stating - ignore all selections except possible values in Date and Hour?
If the data set was flat would that make it the same as sum([Value]) ?
Close enough but not exactly. Certainly direct selections in Date and Hour will not be ignored. But "indirect selections" in Date and Hour made by selections in other fields will not be ignored either.
For example, you select a completely different field, say Product. The selection of the Product is not going to affect the result directly, because of {1}. But if the Product selection changes what Date and Hour values are available, the result will affected.
Either I mis-read your reply, or you've edited it (?)
Yes - "ignore all selections except possible values in Date and Hour".
Flat table - I assume so too.
Yah, I edited it - same reasoning as your previous statement. This has helped me understand - thank you!