Domanda

I need help trying to get sum of columns using ssrs 2005 but my values are converted from the answer to be a number so if the answer was very, it would be converted to a 3, and if answer was quite, it would be converted to a 2. but then i need to get the total of that column of those numbers so my table columns would have this enter image description here

and the expresion in survey column has this

=iif(Fields!Answer4.Value="Very",CInt(3),iif(Fields!Answer4.Value="Quite",CInt(2),iif(Fields!Answer4.Value="Slightly",CInt(1),iif(Fields!Answer4.Value="Not at all" ,CInt(0),""))))

and this is what im trying to achieve the total of survey

Food dish           type    survey

Italian soup        A       3

Pizza Supreme       B       2

Pizza Supreme       B       2

Spaghetti           C       1

Total                       8

Thanks

È stato utile?

Soluzione

I would replace the ? in your = Sum ( ? ) expression with the entire Iif function from your detail row, e.g.

= Sum ( iif(Fields!Answer4.Value="Very",CInt(3),iif(Fields!Answer4.Value="Quite",CInt(2),iif(Fields!Answer4.Value="Slightly",CInt(1),iif(Fields!Answer4.Value="Not at all" ,CInt(0),"")))) )

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top