2016-08-12 51 views
1

我需要帮助创建基于此查询在SSRS的表达在SSRS A = CountDistinct:如何创建基于查询

SELECT COUNT(DISTINCT person_id) FROM person_table 
WHERE (employed = 'Y' or title = 1) 
or (start_date = '' or start_date = '00000000' 
or  start_date > CONVERT (VARCHAR,GETDATE(),112)) 

所有,我到目前为止,这是

=CountDistinct(IIf(Fields!no_unresolved_allergies_ind.Value = "Y",Fields!MRN.Value,Nothing)) 
+0

你可以发布你的模式吗? – bpachev

回答

0

由于信息有限,我会尽力沿着这些方向发展

=CountDistinct(
IIF(
((Fields!employee.Value = "Y" OR Fields!title.value = 1) OR 
(Fileds!start_date.value = " " OR Fileds!start_date.value = "00000000") OR 
(Fields!start_date.Value > FORMAT(NOW(),"yyyyMMdd")),Fields!MRN.Value,Nothing 
     )