[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1044
  • Last Modified:

Business Intelligence Development Studio Expression - Count Boolean Values

I am trying to build a report in Business Intelligence Development Studio.  I want to count several columns of boolean data but only the ones that are 'True' or '1'

Here is the expression I was trying to use:
              =Count(IIF(Fields!IsChild.Value,0,1))
The expression above returns the same value as:
              =Count(Fields!IsChild.Value)
Both return a value of 16 which is the total of True's and False's in the column.
0
masonrono
Asked:
masonrono
1 Solution
 
derekkrommCommented:
1) Iif syntax is (<expression>, <truevalue>, <falsevalue>), so you want to switch your 0,1 to 1,0 i think

2) Try switching to SUM instead of COUNT
0
 
masonronoAuthor Commented:
Thanks, changing it to Sum did the trick.  I know I had tried this with Sum and it gave an error about field type but maybe I had something else wrong elsewhere.  Thanks for the help!
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now