我正在嘗試計算報告中每個組項目的平均加權值。我用所有的建議在this link,但他們給我下面的錯誤:計算Reporting Services 2008中的加權平均值
Warning 1 [rsAggregateOfMixedDataTypes] The Value expression for the textrun ‘textbox134.Paragraphs[0].TextRuns[0]’ uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type.
爲計算加權平均的最好辦法任何建議。我的最新嘗試是這樣的:
=iif(sum(iif(Fields!weight.Value is nothing,0,Fields!weight.Value))= 0, 0, sum(iif((Fields!myData.Value * Fields!weight.Value) is nothing,0,(Fields!myData.Value * Fields!weight.Value)))/ sum(Fields!weight.Value))
感謝