I am having trouble running the following Nested iif statement in an SSRS expression.. any insight would really helps

  • ="Reporting Months:- " & join(iif(Parameters!Month.Value ,"1" ,"January"

        ,iif(Parameters!Month.Value ,"2" ,"February"

       ,iif(Parameters!Month.Value , "3" ,"March"

        ,iif(Parameters!Month.Value ,"4" ,"April"

         ,iif(Parameters!Month.Value ,"5" ,"May"

          ,iif(Parameters!Month.Value , "6" ,"June"

           ,iif(Parameters!Month.Value , "7" ,"July"

            ,iif(Parameters!Month.Value , "8" ,"August"

             ,iif(Parameters!Month.Value ,"9" ,"Setember"

          ,iif(Parameters!Month.Value , "10" ,"October"

           ,iif(Parameters!Month.Value , "11" ,"November"

            ,iif(Parameters!Month.Value , "12" ,"December" ,Nothing

            )))))))))))),",")

  • Why are the month numbers in quotes? They're numbers, not text.

  • pietlinden - Wednesday, July 19, 2017 4:03 PM

    Why are the month numbers in quotes? They're numbers, not text.

    I tried doing that as well.. but no luck

  • What is it you're actually trying to achieve here? As your first part says "Reporting Months" and your use Join, it suggests that you could have multiple months, however, as you test Month and then nest your IIF in the FALSE evaluation (and Month can only have 1 value) then only one of those IIFs will evaluate to TRUE.

    Which of the following are you aiming for your expression to be able to resolve to :
    1. Reporting Months:- January, February, March
    2. Reporting Months:- March

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply