This works:
=IIf(
Fields!EntityID.Value Is Nothing,
Fields!Foo.Value,
Join(
LookupSet(
Fields!EntityID.Value,
Fields!EntityID.Value,
Fields!Bar.Value,
"dsMain"
)
, ",")
)
But this doesn't:
=IIf(
Fields!EntityID.Value Is Nothing,
Fields!Foo.Value,
Count(
LookupSet(
Fields!EntityID.Value,
Fields!EntityID.Value,
Fields!Bar.Value,
"dsMain"
)
)
)
I get #Error, like if the formula is broken. What's wrong with it?