SSRS Expression for IF, THEN ELSE

Arron Robles picture Arron Robles · Dec 4, 2013 · Viewed 137.5k times · Source

I am creating a field from tables with our shoretel phone system and i am intergrating reports via SSRS and i need some assisstance with an expression.

=if(Fields!ExitReason.Value 7,
then if (Fields!ExitReason.Value 1,
else if (Fields!ExitReason.Value 0,)))

Definition results should be:

=if(Fields!ExitReason.Value) = 7 then 1 else 0

I am try to get the field to give me 7, 1 else 0. Any assistance would be great.

Thanks, Arron

Answer

Steve Salowitz picture Steve Salowitz · Dec 4, 2013

You should be able to use

IIF(Fields!ExitReason.Value = 7, 1, 0)

http://msdn.microsoft.com/en-us/library/ms157328.aspx