Solved

Business Intelligence Development Studio Expression - Count Boolean Values

Posted on 2011-03-07
4
979 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
4 Comments
 
LVL 15

Accepted Solution

by:
derekkromm earned 50 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 142

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Read about achieving the basic levels of HRIS security in the workplace.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

708 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

13 Experts available now in Live!

Get 1:1 Help Now