cognos常用函数总结

浏览: 2914

Cognos 常用Function  

1、aggregate
aggregate(currentMeasure within set [INT1],[INT2])
aggregate(currentMeasure within detail [Size])
2、IF
IF ([WIP] is not null) THEN
    ([10C])
ELSE 
    ('')
if(tuple([PNL_QTY],[10A]) is null)
then(0)
else
(tuple([PNL_QTY],[10A]))
3、case
case when length([Model].[MPS_INVENTORY_F].[GRADE]) = 3 
then 'Unknow' else [Model].[MPS_INVENTORY_F].[GRADE] 
end
case when(day([Model].[MPS_INVENTORY_F].[EVT_TIME]   ) - day(current_date)> 7 ) THEN
    ([Model].[MPS_INVENTORY_F].[PNL_QTY] )
ELSE 
    (0)
end
4、total
total([PNL_QTY] within set [Model].[Grade].[GRADE].[M_U_Grade])
5、set
set([G],[I],[V],[O])
6、current_timestamp
7、days
case when 60 < (days(current_date) -days([Model].[EvtTime].[EvtTime].[EvtTime] )) THEN
    ([PNL_QTY])
ELSE 
    (0)
end
8、trim
trim(char([PROD-EDW].[Fab].[Fab].[Fab])) = trim(char(?P_Fab?))
9、tuple
if(tuple([SHT_QTY],[10A1]) is null)
then(null)
else
(tuple([SHT_QTY],[10A1]))
10、ParamDisplayValue
ParamDisplayValue('From Date')
11、filter
filter([Grade], (tuple([SELL_QTY],currentmember([Model].[Grade].[Grade])) isnot null))

98、([Others grade] + [T12])
99、not in
[Model].[Product].[Product].[Module] not in([-2],[-3],[-4],[-5],[-6],[-1],[-7],[-8],[-9],[-10],[-11],[-12],[-13])

[CQM].[Dim_Calendar].[CALD_Month].[Date] between ?P_TD_Calendar_s? and?P_TD_Calendar_e?
 
推荐 0
本文由 bacckom 创作,采用 知识共享署名-相同方式共享 3.0 中国大陆许可协议 进行许可。
转载、引用前需联系作者,并署名作者且注明文章出处。
本站文章版权归原作者及原出处所有 。内容为作者个人观点, 并不代表本站赞同其观点和对其真实性负责。本站是一个个人学习交流的平台,并不用于任何商业目的,如果有任何问题,请及时联系我们,我们将根据著作权人的要求,立即更正或者删除有关内容。本站拥有对此声明的最终解释权。

0 个评论

要回复文章请先登录注册