expression issues

  • Hello,

    I have one following expression:

    =count(IIF(Fields!degreeAttain.Value = "Yes", Fields!SSN.Value, nothing) )

    The result is 0, but I checked the data and I saw "Yes" and "No" for degreeAttain.

    I do not get it. Please help.

    Thanks

  • Your expression is correct. Are you able to paste the SELECT statement and the query results when ran in SSMS?

  • fliu2265 (1/16/2015)


    Hello,

    I have one following expression:

    =count(IIF(Fields!degreeAttain.Value = "Yes", Fields!SSN.Value, nothing) )

    The result is 0, but I checked the data and I saw "Yes" and "No" for degreeAttain.

    I do not get it. Please help.

    Thanks

    If I use a dataset as this with your expression it comes out to 12:

    SELECT 'Yes' AS degreeAttain, 0 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 1 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 2 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 3 AS 'SSN'

    UNION

    SELECT 'No' AS degreeAttain, 4 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 5 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 6 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 7 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 8 AS 'SSN'

    UNION

    SELECT 'No' AS degreeAttain, 9 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 10 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 11 AS 'SSN'

    UNION

    SELECT 'No' AS degreeAttain, 12 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 13 AS 'SSN'

    UNION

    SELECT 'Yes' AS degreeAttain, 14 AS 'SSN'

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton

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

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