This is a migrated thread and some comments may be shown as answers.

Issue with count in an expression

1 Answer 163 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
caddy
Top achievements
Rank 1
caddy asked on 21 Apr 2011, 09:18 PM
I have a report that requiers a count of users in specific roles.  I am usiing the following expression:
= IIF(Count(Fields.spendSpeakerID) = 1 ,Count(Fields.spendSpeakerID),Count(Fields.spendUserID))

If the user is a speaker the it populates with 1 which is correct however if the user is a none speaker it populates with a 1 also.

I have made two text boxes and used the following Count(Fields.spendUserID) and Count(Fields.spendSpeakerID).  The text boxes show the correct umber 1 and in this case 8.  However I cannot get the text boxes that make up the column to show the correct number of users when I use a conditional statement.

As a side note there will only be a maximum speakerID of 1 in any report.  But the number of non-speaker users will vary.

I thought about using the value of the test Textbox that gives the correct number but I found out I cannot reference that value.  Any help or suggestions?

Russ

1 Answer, 1 is accepted

Sort by
0
Squall
Top achievements
Rank 1
answered on 27 Apr 2011, 08:09 AM
Hi,
have you tried the other way around = Count(IIF(Fields.spendSpeakerID = 1,Fields.spendSpeakerID,Fields.spendUserID))
Tags
General Discussions
Asked by
caddy
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
Share this question
or