Count expression SSRS Report

前端 未结 3 698
花落未央
花落未央 2021-02-05 08:32

Trying to count all rows in a column where column=Yes I have two columns in my report Accepted and rejected.

I\'m trying to count the rows where accepted=Ye

相关标签:
3条回答
  • 2021-02-05 08:58

    =SUM(IIf(Fields!Doc_Type.Value = "Shipments", 1, 0), "YourDataSetName")

    this worked for me with no errors. saw this on another post.

    0 讨论(0)
  • 2021-02-05 08:59

    You can do this a couple of ways:

    SUM(IIF(Fields!accepted.Value="Y",1,0))
    

    or

    COUNT(IIF(Fields!accepted.Value="Y",1,Nothing))
    

    COUNT is a count of all Rows, so even by returning 0 it will get included in the count. This is why returning Nothing should do the trick.

    0 讨论(0)
  • 2021-02-05 08:59

    You can try to use "And" Operators to check both conditions together.

    =COUNT(IIF(Fields!accepted.Value ="Y" And Fields!rejected.value="Y",1,0))
    
    0 讨论(0)
提交回复
热议问题