Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to write multiple AND and OR condition in SSRS Expressions

(0) ShareShare
ReportReport
Posted on by 74

Hello,

One of my requirement is as below

IF    Fields!ParameterDate.Value = Fields!ModifiedOn.Value AND

Fields!statuscodeValue.Value = 1 OR Fields!statuscodeValue.Value = 2,

Then 

Count(Fields!ticketno.Value)

How do i write expression in ssrs report . Please help me with this

Thank you.

*This post is locked for comments

  • David Jennaway Profile Picture
    14,065 on at
    RE: How to write multiple AND and OR condition in SSRS Expressions

    You can also use AndAlso instead of And, and ORELSE instead of OR. These short-circuit the logic, which is useful if any of the fields contain a null value, which might otherwise cause the expression to fail

  • Suggested answer
    Saddamk206 Profile Picture
    777 on at
    RE: How to write multiple AND and OR condition in SSRS Expressions

    Hope this expression will work for you

    IIF((Fields!ParameterDate.Value = Fields!ModifiedOn.Value) AND (Fields!statuscodeValue.Value = 1 OR Fields!statuscodeValue.Value = 2),Count(Fields!ticketno.Value),0)

  • Suggested answer
    Dynamics365 Rocker Profile Picture
    7,755 on at
    RE: How to write multiple AND and OR condition in SSRS Expressions

    IIF((Fields!ParameterDate.Value = Fields!ModifiedOn.Value) AND ((Fields!statuscodeValue.Value = 1) OR (Fields!statuscodeValue.Value = 2)),Count(Fields!ticketno.Value),0)

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: How to write multiple AND and OR condition in SSRS Expressions

    Have tried using Parenthesis

    IF ((Fields!ParameterDate.Value = Fields!ModifiedOn.Value AND

    Fields!statuscodeValue.Value = 1) OR Fields!statuscodeValue.Value = 2),

    Then 

    Count(Fields!ticketno.Value)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans