简体   繁体   English

SSRS 将不同的表达式计数为是或否

[英]SSRS Count Distinct Expression into a Yes or No

I'm wondering if there's a way or an expression I could use in SSRS to show a Yes or No based on a Distinct Count function?我想知道我是否可以在 SSRS 中使用一种方法或表达式来根据不同的计数 function 显示是或否?

Example of what I'm currently using - RM_Name is the group我当前使用的示例 - RM_Name是组

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

I also would like to show if the qtrtradecnt is >= 15 to show a Y or N based on the RM_Name group, and maybe countdistinct is not the correct function to use...I've messed with this for days.我还想显示qtrtradecnt is >= 15以显示基于RM_Name组的 Y 或 N,并且countdistinct可能不是正确的 function 使用......我已经搞砸了好几天。

Thank you!谢谢!

One way to do this is to the calculation in your your dataset.. with a case expression..一种方法是在您的数据集中进行计算..使用案例表达式..

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

from your_table

Then in your report just do a然后在你的报告中做一个

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM