SSRS IIF Expression Question

Suguha 96 Reputation points
2021-03-04T23:19:40.18+00:00

=IIF((Fields!Description.Value Like "*Youth") and (Fields!Value.Value = "Yes"), (Fields!Description.Value Like "*Youth"))

I'm trying to attempt to look for anything in the description *Youth and the value needs to equal YES so if those two meet up to be correct then display the correct name in the description field. if that makes any sense. I'm wondering if the IIF field is the correct expression that I need to do. or is there something else that I can do to write this correctly.

Thanks Suguha

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.
3,063 questions
0 comments No comments
{count} votes

Accepted answer
  1. Suguha 96 Reputation points
    2021-03-05T16:05:41.343+00:00

    Cool that works, this is the part of the job that I can't stand is right in SQL reports. This is not my expertise.


1 additional answer

Sort by: Most helpful
  1. ZoeHui-MSFT 41,491 Reputation points
    2021-03-05T02:09:49.067+00:00

    Hi @Suguha

    As your described, the IIF Expression could meet your requirement.

    =IIF((Fields!Description.Value Like "*Youth" and Fields!Value.Value = "Yes",Fields!Name.Value,nothing)  
    

    You may replace 'nothing' with the value you want.

    expression-examples-report-builder-and-ssrs

    Regards,

    Zoe


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October

    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.