Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Subtracting two fields

Author  Topic 

CoachBarker
Posting Yak Master

170 Posts

Posted - 2009-02-20 : 14:02:33
Since everything else seems so basic in reporting would this be the correct way to get the difference between to fields in a report using expressions?

=(Fields!firstnumber.Value) - =(Fields!secondNumber.Value)

I also am assuming that they need to include the grouping that they reside in

=(Fields!firstnumber.Value,"Group1") - =(Fields.secondNumber.Value,"Group1")

Thanks for the help
CoachBarker

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-21 : 02:38:01
=Fields!firstnumber.Value -Fields!secondNumber.Value

you dont need to use group scope explicitly unless you're using the above expression in a scope outside of Group1. also i assume both of them contain numeric values else it will break.

Go to Top of Page

CoachBarker
Posting Yak Master

170 Posts

Posted - 2009-02-21 : 08:56:28
yes they are numeric

Thanks for the help
CoachBarker
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-22 : 01:29:54
then this should work.cheers

Go to Top of Page
   

- Advertisement -