Excel PowerPivot - 过滤常量而不是数值

时间:2015-02-19 16:29:09

标签: excel-2013 powerpivot

在MS Excel 2013 PowerPivot中,我有一个表,由与SQL Server的外部数据连接提供。在“tabl”powerpivot表中有行数据我正在根据静态数值进行大量计算,如:

Total1#:=Calculate(CountRows(Tabl),Tabl[requestID]=1,Tabl[Status]=3,Tabl[Flag]<>0),Tabl[userID]=15)

Total2#:=Calculate(CountRows(Tabl),Tabl[requestID]=1,Tabl[Status]=3,Tabl[Flag]<>0),Tabl[userID]=16)

因此,当数据源ID发生变化时,我必须逐个修改几十个公式,只是用新的ID替换旧的ID。有人可以建议如何使用某种常量/计算值来做这样的事情:

Total1#:=Calculate(CountRows(Tabl),Tabl[requestID]=CONST1,Tabl[Status]=CONST2,Tabl[Flag]<>CONST3),Tabl[userID]=CONST4)

PowerPivot有可能吗?

0 个答案:

没有答案