【问题标题】:SSRS Count Distinct Expression into a Yes or NoSSRS 将不同的表达式计数为是或否
【发布时间】:2019-11-06 21:37:42
【问题描述】:

我想知道是否有一种方法或表达式可以在 SSRS 中使用,以根据不同计数函数显示是或否?

我目前使用的示例 - RM_Name 是组

=CountDistinct(iif(Fields!qtrtradecnt.Value >= 15, 1, Nothing), "RM_Name")

我还想显示 qtrtradecnt is >= 15 是否基于 RM_Name 组显示 Y 或 N,也许 countdistinct 不是正确使用的函数...我已经搞砸了天。

谢谢!

【问题讨论】:

  • 我会创建一个计算字段,然后在此基础上执行此逻辑。

标签: sql reporting-services ssrs-2012 ssrs-2008-r2


【解决方案1】:

一种方法是在您的数据集中进行计算.. 使用案例表达式..

select
...
,case when your_table.qtrtradecnt >= 15 then 1 else 0 end as rm_count 

from your_table

然后在你的报告中做一个

=iif(sum(Fields!rm_count.value) >15 然后 'Y','N')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-08
    • 1970-01-01
    • 2015-07-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多