Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to Reporting services 1

Status
Not open for further replies.

Gramm

Instructor
May 16, 2003
92
US
I am trying to create a calculated field that uses a nested if statement and calculates a payincrease. Example:

If year(today)- year(hiredate)< 5 then salary*.05
else If year(today)- year(hiredate)> 10 then salary*.08
else salary*.07 Reporting services tells me I have an error.

I have used this calculations in other programs so it must be something about the syntax in ReportingServices.

 
HI,

You need to use an Inline IF statememnt:

Code:
=IIF(YEAR(Today)-YEAR(HireDate)<5,Salary*0.05,IIF(YEAR(Today)-YEAR(HireDate)>10,Salary*0.08,Salary*0.07))

Hope this helps.

Cheers,
Leigh

The problem with common sense is that it isn't that common!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top