SSRS Expression for IF, THEN ELSE
You should be able to use
IIF(Fields!ExitReason.Value = 7, 1, 0)
http://msdn.microsoft.com/en-us/library/ms157328.aspx
Related videos on Youtube
Arron Robles
Collaboratively works with IT management, business leaders, and analysts to review requests, analyze requirements, establish priorities and set direction, aligning with overall company and department objectives. Manages, Business Intelligence, and Intranet solutions. Mentors and trains employees to develop best practices, technical, project. Project management oversight, delivering status updates regularly to management teams. Architects overall data strategy for Business Intelligence. Provides both a leadership role and contributes directly to projects and ongoing support. Business Intelligence concepts and data architecture to support analytic and operational reporting and information delivery. Information delivery including BI/analytic reporting, operational reporting, KPI’s, Dashboards, Charting. Experience in architecting, leading and implementing Business Intelligence projects.Microsoft SharePoint for intranet, workflow, document management, and information delivery. Expertise: SQL Server Enterprise platform, including: SQL Server 2012 DB, SSIS, SSRS, SSAS, PowerPivot, PerformancePoint, PowerView, Excel Services, SharePoint. Nintex Workflows, Nintex Forms
Updated on July 05, 2022Comments
-
Arron Robles almost 2 years
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
-
LCJ about 10 yearsTake a look at stackoverflow.com/questions/3551966/…
-
-
Arron Robles over 10 yearsThank you Steve. This was very helpful and resolved my issue.
-
asela daskon almost 8 yearsI have a field called ta_amount. if the value inside this filed is >100 then it's should be divided by 100 otherwise display "no pound". but my expression gives me a error. =IIf((Fields!ta_amount.Value > 100), ([(Fields!ta_amount.Value)/100]), "No Pound")
-
PedroC88 over 6 yearsI know this is old but the answer to @aselanuwan comment is found in this other SO question stackoverflow.com/questions/37283287/…. In summary, IIF doesn't short-circuit, meaning it always evaluates both sides, regardless of the result.