Reputation: 1
I have a data set that is returning two properties, a name and a total units. I am trying to set an iif expression on a data bar where iif(field!Name.Value = "Name", field!Total.Value, 0)
this is not working I get an error of rsFieldReferanceAmbiguous
, the fields refers without specifying a dataset aggregate. And the only option that it gives me as an aggregation is First
, but I do not want to get the first name, I want the bar to display the total units base on the name field that is in the iif
expression.
Upvotes: 0
Views: 734
Reputation: 135
Make sure your tablix has the dataset specified under General -> DataSetName on the properties pane. If you have more than one data set on the report you will need to specify which data set your reffering to like so:
(Fields!Name.Value, "NameDataSet")
If your useing tables you may need to ckeck if you have grouping and if so how your grouping your data.
Upvotes: 0
Reputation: 6034
The function you are trying to use would be better suited to a calculated field in your dataset. Then you can just refer that that field in your report. This allows you to filter the data line by line instead of by groups.
Upvotes: 0
Reputation: 20560
rsFieldReferenceAmbiguous
refers to trying to match something that is not in local scope. Therefore you have to aggregate it. You are probably wanting something like this:
=Sum(IIF(Fields!Name.Value = "Name", Fields!Total.Value, 0))
Upvotes: 0