Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have fields containing the value '?'.
Now I want to count those fields like:
count({1<[Field] = {'?'}>} [Field])
But this does not only apply to fields with '?', it interpretates the ? as a wildcard and sums up other fields like 'a' and 'b'.
The question is, how can I write the {'?'} expression, so that I get what I want?
thanks
How about this:
Count({1<[Field] = {"=WildMatch(Replace(Field, '?', '|'), '*|*')"}>} [Field])
Like this:
Count({1<[Field] = {'*?*'}>} [Field])
Or this:
Count({1<[Field] = {"=WildMatch(Field, '*?*')"}>} [Field])
Like this:
Count({1<[Field] = {'*?*'}>} [Field])
___
This version returns all of my fields as true
Or this:
Count({1<[Field] = {"=WildMatch(Field, '*?*')"}>} [Field])
___
This version returns none of my fields as true
Thanks for the fast answer, but both methods don't work as I need them to
How about this:
Count({1<[Field] = {"=WildMatch(Replace(Field, '?', '|'), '*|*')"}>} [Field])
Slightly different but with the same approach:
count({< [Field]= {"=[Field]<>purgechar([Field],'?')"}>} [Field])
- Marcus
Both of the last two answers work as I intended them to work - thanks for the help
The code is not quite as simple as one should assume though, but now one can look it up in this thread^^