Report Builder Expression For Dividing Using An IIF Statement

Seuban 6 Reputation points
2022-04-26T16:14:40.117+00:00

I am new to report builder and am trying to get a percentage of loans funded based on a datafield that has multiple values so I need to be able to distinguish those two values separately and divide it by the total number of applications submitted. For example, Fields!Final_Decision.Value="LO Approved"" Or Fields!Final_Decision.Value="Auto Approved" / Count(Fields!Application.Value.

I was trying to write the expression as a Sum(IIF but it's not working. I used the IIF function to pull the values in the Approved column and it appears to be working as it should =Count(IIf(Fields!Final_Decision.Value="LO Approved" Or Fields!Final_Decision.Value="Auto Approved", "1", Nothing)) but now I need to divide that column by =Count(Fields!Application.Value).

Hope this makes sense. I would really appreciate any help on how I need to write this expression.

Thanks!

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,951 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Seuban 6 Reputation points
    2022-04-26T19:07:22.317+00:00

    I have figured it out. I used the expression:

    =Sum(IIF(Fields!Status_.Value="Disbursed", "1", "0")/Count(Fields!Application.Value))

    It is giving me the correct values now.

    Thanks!

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.