Hi,
I am trying to create a stand-alone calculation in framework manager so that users will be able to apply it to a column they select in Query Studio.
I am new to Cognos and it may just be a syntax issue. The code I used for the calculation for a field named M24 is as follows in case it helps:
IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .90) THEN
(10)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .80) THEN
(9)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .70) THEN
(8)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .60) THEN
(7)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .50) THEN
(6)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .40) THEN
(5)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .30) THEN
(4)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .20) THEN
(3)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .10) THEN
(2)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .00) THEN
(1)
ELSE
(0)
Any help would be greatly appreciated!
--Brian
I am trying to create a stand-alone calculation in framework manager so that users will be able to apply it to a column they select in Query Studio.
I am new to Cognos and it may just be a syntax issue. The code I used for the calculation for a field named M24 is as follows in case it helps:
IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .90) THEN
(10)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .80) THEN
(9)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .70) THEN
(8)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .60) THEN
(7)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .50) THEN
(6)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .40) THEN
(5)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .30) THEN
(4)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .20) THEN
(3)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .10) THEN
(2)
ELSE IF (percentile ( [Pharmion_DW_Connection].[T_DRV_SALES_OUTLETS].[M24]) >= .00) THEN
(1)
ELSE
(0)
Any help would be greatly appreciated!
--Brian