Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
on the screenshot you can see which functions I use and below of each function the result:
The variable vReduceSelection contains the string Fleet Type.
I wonder why Getpossiblecount and Count(Distinct Total ... ) gives me a different result...Or why GetpossibleCount gives me no result? And why Count(Distinct Total ) (with vaiable) gives me a result, but obviously not the correct one.
I would appreciate if someone has an explanation for this behavior.
Best Regards,
Peter
Because the variable expansion is made as a text, as a string. And not as a field reference. See picture and you'll understand.
The chart label shows how I have written the first expression. The second expression is written the same way, but with the Only() function. The third column is written without any concatenation or quotes, and then it is correctly interpreted as a field reference.
The column headers show how what I have written is interpreted by the calculation engine. Obviously column 1 and 2 are interpreted as strings and not as a field reference. But the third one is interpreted as a field reference.
HIC