SQLTeam.com | Weblogs | Forums

Help with Another Expression


#1

Hello,

I am trying to add a row of 4 cells. The cells each have a custom expression within them like so:

=CDBL(reportitems!Textbox33.Value) / CDBL(reportitems!Textbox103.Value)
=CDBL(reportitems!Textbox34.Value) / CDBL(reportitems!Textbox103.Value)
=CDBL(reportitems!Textbox35.Value) / CDBL(reportitems!Textbox103.Value)
=CDBL(reportitems!Textbox37.Value) / CDBL(reportitems!Textbox103.Value)

Each cell equals a percentage.

If these 4 are added, they will equal exactly 100%.

Your masterful knowledge is always appreciated :smile:


#2

Not quite sure what you are asking, but can't you add the four values like this?

=CDBL(reportitems!Textbox33.Value) / CDBL(reportitems!Textbox103.Value)
+CDBL(reportitems!Textbox34.Value) / CDBL(reportitems!Textbox103.Value)
+CDBL(reportitems!Textbox35.Value) / CDBL(reportitems!Textbox103.Value)
+CDBL(reportitems!Textbox37.Value) / CDBL(reportitems!Textbox103.Value)

Or, assuming the four cells are Textbox1 through Textbox4,

=CDBL(reportitems!Textbox1.Value)
+CDBL(reportitems!Textbox2.Value)
+CDBL(reportitems!Textbox3.Value)
+CDBL(reportitems!Textbox4.Value)

#3

You nailed it, Sir. Still learning so many new things with SSRS.

Thanks for everything and Merry Christmas!