Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Business Intelligence Development Studio Expression - Count Boolean Values

Posted on 2011-03-07
4
Medium Priority
?
1,034 Views
Last Modified: 2012-05-11
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
Comment
Question by:masonrono
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 15

Accepted Solution

by:
derekkromm earned 200 total points
ID: 35060704
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
 

Author Comment

by:masonrono
ID: 35061675
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
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 36202662
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

715 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