SQL expression /// sum  SSRS

Posted on 2012-09-18
Last Modified: 2012-10-02
In the following expression:

=Sum(iif(cint(Fields!Range.Value) >= 0 And cint(Fields!Range.Value) <= 124999
 And (Fields!Date2 = Max(iif(Fields!Range.Value >= 0 And Fields!Range.Value <= 124999 and Fields!Date1.Value
  =Max(Fields!Date1.Value,  "Master_Policy_Number")
  ,Fields!Date2, Nothing), "Master_Policy_Number")),
      cint(Fields!Range.Value), 0))

I need to sum 1 and ONLY one where the coditions are met..

Question by:vbnetcoder
    LVL 27

    Accepted Solution

    One thing you might want to look at is to  group your Query by Dates; then setup your sum expression per group
    LVL 11

    Expert Comment

    Can you please explain in details your iisue.. currently your syntax is wrong

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
    It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now