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?