problem on using count expression
i have a requirement where in i need to get number of emergency and non emergency tickets.i have a column as level 3 which gives emergency and non emergency tickets. i tried this count expression
=COUNT(IIF(Fields!LEVEL3.Value =
"Non-emergency", 1, 0))
which is giving me a count of both emergency and non emergency tickets together but i need them as saperate count.
what would be the correct expression?msmustard
December 2nd, 2011 9:44am
Try
SUM(IIF(Fields!LEVEL3.Value = "Non-emergency", 1, 0))
Remember to mark as an answer if this post has helped you.
Free Windows Admin Tool Kit Click here and download it now
December 2nd, 2011 3:45pm
Also:
=COUNT(IIF(Fields!LEVEL3.Value ="Non-emergency", 1, NOTHING))
Regards,
Asim Bagwan
Kindly mark the replies as Answers if they help!
December 4th, 2011 5:28am
it is giving a 0. i tried giving this expression
=COUNT(IIF(Fields!LEVEL3.Value ="Non-emergency", 1,
NOTHING))
and
SUM(IIF(Fields!LEVEL3.Value =
"Non-emergency", 1, 0))
i am getting a value of zero. please helpmsmustard
Free Windows Admin Tool Kit Click here and download it now
December 5th, 2011 7:08pm
i have to get number of emrgency and number of non emergency tickets . i have tried using the count as well as the sum expression. i am taking count of emergency ticket in one row and count of non emergency in another row. taking two expxressions as
=count(IIF(Fields!LEVEL3.Value =
"non-emergency", 1, 0))
=count(IIF(Fields!LEVEL3.Value =
"emergency", 1, 0))
i am getting correct number of non-emergency ticket count but not emergency.
please help
msmustard
December 5th, 2011 10:52pm
Here is number of emergency tickets:
SUM(IIF(Fields!LEVEL3.Value = "emergency", 1, 0))
Here is number of non-emergency tickets:
SUM(IIF(Fields!LEVEL3.Value = "emergency", 0, 1))
Remember to mark as an answer if this post has helped you.
Free Windows Admin Tool Kit Click here and download it now
December 5th, 2011 10:56pm
i used it and it is giving count of emergency and non emergency in Total number of non-emergency tickets. and for emergency tickets =0 .
even if there are like 3 emergency and 4 non emergency it is giving
Total non emergency =7
total emergency=0
msmustard
December 5th, 2011 11:13pm
For emergency tickets you may try:
SUM(IIF(LCase(Trim(Fields!LEVEL3.Value)) = "emergency", 1, 0))
and for non-emergency:
SUM(IIF(LCase(Trim(Fields!LEVEL3.Value)) = "emergency", 0, 1))Remember to mark as an answer if this post has helped you.
Free Windows Admin Tool Kit Click here and download it now
December 6th, 2011 9:17am
Hi,
Add a calculated column in your dataset and give the name like LEVEL3_Count and use the expression as
=IIF(Fields!LEVEL3.Value ="Non-emergency", 1, 0)
And on report level, use this field by using the expression as
=SUM(Fields! LEVEL3_Count.value)Aftab Ansari
December 6th, 2011 9:34am
Thank you so much , i got itmsmustard
Free Windows Admin Tool Kit Click here and download it now
December 6th, 2011 10:54am
Thanks
msmustard
December 6th, 2011 10:55am