iif(IsEmpty([Measures].[挂号人数]-[Measures].[退挂人数]),0,[Measures].[挂号人数]-[Measures].[退挂人数]
IsEmpty([Measures].[挂号人数]) or isEmpty([Measures].[退挂人数])
----------------------------------------------------------------------------------
select
iif(IsEmpty([Measures].[挂号人数]),0,[Measures].[挂号人数])on 0,
[日期].[年月日].Members on 1
from [SC Hospital DW] 为这样写查询出来也有NULL值
公式不能写到select后面
这样就对了with member [Measures].[ss]
as 'iif(IsEmpty([Measures].[挂号人数]),0,[Measures].[挂号人数])'
select
[Measures].[ss] on 0,
[日期].[年月日].Members on 1
from [SC Hospital DW]
----------------------------------------------------------------------------------
([Measures].[实际挂号人数],[门诊医生专业信息].[门诊医生专业].CurrentMember)/([Measures].[实际挂号人数] , [门诊医生专业信息].[门诊医生专业].levels(0).members.item(0))
---类型的问题,没有.item(0)之前的部分类型是集合
([Measures].[实际挂号人数],[门诊医生专业信息].[门诊医生专业].levels(0).members.item(0) )
给
sum([门诊医生专业信息].[门诊医生专业].levels(0).members,[Measures].[实际挂号人数])
我觉得是一个意思,所以就想用SUM
两个应该等价,但是第一个速度快,不过不知道为什么第二个出错
----------------------------------------------------------------------------------
iif(IsEmpty([Measures].[门诊收入处方数]) or IsEmpty([Measures].[门诊人次数]),0,[Measures].[门诊收入处方数]/[Measures].[门诊人次数])
-------------------------------------------------------------------------------------
[日期.年月日].currentMember/[日期.年月日].currentMember.firstSibling
---------------------------------------------------------------------------------------
把SQL Server Analysis Services里面的SC Hospital DW这个库删除掉重新部署
打开控制面板-》管理工具-》事件查看器,清空所有日志
([日期.年月日].currentMember,[Measures].[实际挂号人数])/(linkmember(linkmember([日期.年月日].currentMember,[日期.年周日]).firstSibling,[日期.年月日]),[Measures].[实际挂号人数])