how to count specific values in single column
Dear Sir,
I need how to count specific values in single column
i'd tried count functions but i don't got result
below mention the screen short
i'd tried below code
=Count(Fields!TransitionID.Value=9)
September 1st, 2012 2:44am
Hi,
If you using SSRS 2008 R2, you can use below mentioned steps
1. Add a another dataset for taking count say "DataSet2". Use the same where condition filters you have used for the main dataset.
Select TransactionID, count(*) as cnt
from TableName
where Cond1, cond2, ...
group by TransactionID
2. Now, Add a below expression for TransactionID column
="The fields no. of TransactionID=" + cstr(Fields!transactionID.Value) + " is " + CSTR(Lookup(Fields!transactionID.Value,Fields!transactionID.Value,Fields!cnt.Value,"DataSet2"))
- Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 4:30am
i don't know
____________________________________________
game dien thoai,
game mobile,
hack avatar,
hack army
September 1st, 2012 4:38am
Dear Sir,
I'd tried but i'm getting error
The Value expression for the textrun TransitionID.Paragraphs[0].TextRuns[0] contains an error: [BC30451] 'Lookup' is not declared. It may be inaccessible due to its protection level
using visual studio 2010 and vb.net
and i need show
Fields!TransitionID.Value=9 and 10 only
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 7:34am
Hi,
Give a try to this one
=IIF((Fields!TransitionID.Value=9 or Fields!TransitionID.Value=10),Count(Fields!TransitionID.Value),"")
Hope this will help you !!!
Sanjeewan
September 1st, 2012 8:14am
Dear Sir,
i'd tried but don't got result
my need mention above the screen shorts
Free Windows Admin Tool Kit Click here and download it now
September 1st, 2012 8:58am
Hi,
If you want this for hardcoded 9 and 10, below is the expression
=IIF(Fields!TransactionID.Value = 9 , "The fields no. of TransactionID=" + cstr(Fields!TransactionID.Value) + " is " + CSTR(sum( IIF(Fields!TransactionID.Value = 9,1,0),"DataSet1")) , IIF(Fields!TransactionID.Value = 10 , "The fields no. of TransactionID=" + cstr(Fields!TransactionID.Value) + " is " + CSTR(sum( IIF(Fields!TransactionID.Value = 10,1,0),"DataSet1")) , NOTHING))
That lookup will work for all the values, but looks like you are developing RDLC report, so that function not supported.- Chintak (My Blog)
September 1st, 2012 10:16am
Hi,
I'd tied to put your expression one tablix2 column but i got the result is no.of transitionID=9 have, that expresion also show same type
i need single row only show bottom of tablix1
please help me
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2012 12:46am
Hi There
Thanks for your posting. Can you please use this expression
=count(iif(Fields!TransitionID.Value=10
or Fields!TransitionID.Value=9,1,nothing))
=count(iif(Fields!TransitionID.Value=10 or Fields!TransitionID.Value=9,1,nothing))
A screenshot for your help
I hope this will help.
Many Thanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
September 2nd, 2012 8:03pm
Thank you very much,
It's very helpful, again lot of thanks,
Regards,
Emalai
Free Windows Admin Tool Kit Click here and download it now
September 3rd, 2012 12:44am
Hi Emalai
Thanks for your posting again. I am glad that your problem has been resolved. Good luck for your project.
Many thanks
Syed Qazafi Anjum
September 3rd, 2012 1:16am