Avatar of Martin Spalding
Martin Spalding
 asked on

SSRS Expression IIF Statements

Hi,

I have the below iif statement within my expression. How can I take this further to perform further actions if the result is in fact "B"?

[code][/=IIf(
            (
                  iif
                  (
                        Fields!MandateReference.Value Like "*85397"
                        OR Fields!MandateReference.Value Like "*85398"
                        OR Fields!MandateReference.Value Like "*85399", Fields!Local_Currency.Value," "
                  )
                  /
                  (
                        iif
                        (
                              Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!MandateReference.Value, "d_ExcludedHoldingsGFS") Like "*00001"
                              OR Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!MandateReference.Value, "d_ExcludedHoldingsGFS") Like "*00002"
                              OR Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!MandateReference.Value, "d_ExcludedHoldingsGFS") Like "*00003",
                              Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!Local_Currency.Value, "d_ExcludedHoldingsGFS")," "
                        )
                        +
                        iif
                        (
                              (Fields!MandateReference.Value Like "*85397"
                              OR Fields!MandateReference.Value Like "*85398"
                              OR Fields!MandateReference.Value Like "*85399"), Fields!Local_Currency.Value," "
                        )
                  )
                  >= 0.5
            )
            OR
            (
                  iif
                  (  
                        (Fields!MandateReference.Value Like "*85397"
                      OR Fields!MandateReference.Value Like "*85398"
                      OR Fields!MandateReference.Value Like "*85399"), Fields!Local_Currency.Value," "
                  )
                  /
                  (
                        iif
                        (
                              Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!MandateReference.Value, "d_ExcludedHoldingsGFS") Like "*00001"
                              OR Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!MandateReference.Value, "d_ExcludedHoldingsGFS") Like "*00002"
                              OR Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!MandateReference.Value, "d_ExcludedHoldingsGFS") Like "*00003",
                              Lookup(Fields!MandateReportingName.Value, Fields!MandateReportingName.Value, Fields!Local_Currency.Value, "d_ExcludedHoldingsGFS")," "
                        )
                        +
                        iif
                        (  
                              (Fields!MandateReference.Value Like "*85397"
                              OR Fields!MandateReference.Value Like "*85398"
                              OR Fields!MandateReference.Value Like "*85399"), Fields!Local_Currency.Value," "
                        )
                  )
                  <= 0.3
            ), "A", "B"
     )code]

Thanks.
SSRS

Avatar of undefined
Last Comment
Megan Brooks

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Arifhusen Ansari

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Megan Brooks

Keep in mind that IIF is just a shorthand way of writing a searched CASE, for simple expressions. You might end up with a more readable and easier to debug query if you used CASE.
Your help has saved me hundreds of hours of internet surfing.
fblack61