Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8184349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:28:20+00:00 2026-06-07T01:28:20+00:00

This is the expression I’m trying to evaluate: Sum(IIF(QUALITY<=9.0,1.0,0.0)) The problem is that string

  • 0

This is the expression I’m trying to evaluate:

Sum(IIF(QUALITY<=9.0,1.0,0.0))

The problem is that

string expr = "Sum(IIF(QUALITY<=9.0,1.0,0.0))";
dataTable.Compute(expr, "")

throws an error saying

Syntax error in aggregate argument: Expecting a single column argument with possible 'Child' qualifier.

The main challenge is that I can’t rewrite the expression by hand, since it’s coming to my program in a string from an RDL file, so it originally looks like

Sum(IIF(Fields!QUALITY.Value<=9.0,1.0,0.0))

and my program needs to automatically convert that into a string that will be a valid expression when passed to dataTable.Compute(). I determined from Microsoft’s documentation of the Compute method that C# doesn’t like the “Fields!” or “.Value” parts of the syntax, and by removing them I have simpler expressions working fine; for example, these statements both return the expected values:

dataTable.Compute("Sum(QUALITY)");
dataTable.Compute("Count(QUALITY)");

Is it possible to do what I’m trying to do? I feel like I should just need a slight change in syntax somewhere for it to work, but I haven’t been able to find an answer on the internet and it’s getting pretty frustrating.

Here are some of the things I’ve tried so far, to no avail:

Sum(IIF([QUALITY]<=9.0,1.0,0.0))
Sum(Convert(IIF(QUALITY<=9.0,1.0,0.0), 'System.Double'))
Sum(IIF(Convert(QUALITY, 'System.Double')<=9.0,1.0,0.0))    
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T01:28:22+00:00Added an answer on June 7, 2026 at 1:28 am

    One way to do this might be to add an aggregate column to the DataTable with the Expression set to IIF(QUALITY<=9.0,1.0,0.0).

    dataTable.Columns.Add("AggregateColumn", typeof(double), "IIF(QUALITY<=9.0,1.0,0.0)");
    

    then sum or count the aggregate column.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to set the Hidden-property of a Textbox based on this expression: =IIf(IsNothing(Parameters!customer_numbers.Value)
I have a string expression that I need to do eval on. This expression
Trying to get this expression to work, can someone look at it and tell
They said this expression is valid in C, and that it means calling a
I can't find out why throw this expression always a NullPointerException: String jpql =
I am having trouble with this expression: preg_match('#<file(.*)source-language=(.){2}(.*)>#Ui', $xliff, $matches); I am trying to
I have this expression : Expression<Func<string, bool>> f = s => s.Length < 5;
I'm trying to match this expression: ^COMA1TA2000,.*$ with this text: # Qualquer linha iniciada
I got an problem i'd like to solve. This expression works as long as
I have this expression ([^]+)|(\s\S*\s) which gets any characters that are in quotes and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.