Good morning everyone,
I’m trying to a CountDistinct on a dataset value.
The value of the field I’m trying to do count on is:
=IIF((First(Fields!CustID.Value, “Customer”) = “STELL”) AND (Fields!ProdCode.Value = “MC”) OR (Fields!ProdCode.Value= “MT”) OR (Fields!ProdCode.Value= “CH”) OR (Fields!ProdCode.Value= “HH”) OR (Fields!ProdCode.Value= “XTL”), “Demo”, “Work Ready”)
I thought I could do:
=CountDistinct((IIF(Fields!CustID.Value, “Customer”) = “STELL”, AND (Fields!ProdCode.Value = “MC”) OR (Fields!ProdCode.Value= “MT”) OR (Fields!ProdCode.Value= “CH”) OR (Fields!ProdCode.Value= “HH”) OR (Fields!ProdCode.Value= “XTL”,Nothing)))
but I get the error: Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.
Does anyone know a way I can do a Count on this field?
Thanks,
Jonathan