企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 2893|回复: 6

IF statements in Cognoscenti Insight

[复制链接]

83

主题

416

帖子

588

积分

高级会员

Rank: 4

积分
588
QQ
发表于 2014-3-17 10:23:43 | 显示全部楼层 |阅读模式
Hi,

I have been trying to use an IF function in a calculation section but I keep getting a syntax error saying ; missing left parenthesis.

Can anybody help me solve this?
Thanks
回复

使用道具 举报

58

主题

393

帖子

540

积分

高级会员

Rank: 4

积分
540
QQ
发表于 2014-3-17 11:53:44 | 显示全部楼层
If you post your code people will be able to tell you what is wrong with it.
回复 支持 反对

使用道具 举报

66

主题

378

帖子

540

积分

高级会员

Rank: 4

积分
540
QQ
发表于 2014-3-17 11:54:52 | 显示全部楼层
Jwreford wrote:Hi,

I have been trying to use an IF function in a calculation section but I keep getting a syntax error saying ; missing left parenthesis.

Can anybody help me solve this?
Thanks
Can you please post the code you're trying to get working?
回复 支持 反对

使用道具 举报

82

主题

368

帖子

553

积分

高级会员

Rank: 4

积分
553
QQ
发表于 2014-3-17 11:56:39 | 显示全部楼层
Hi,

Sorry it would not let me post earlier, here is the code,
if(['ABS ERROR']=0,1,if(&(['ABS ERROR']>0,['FORECAST']=0,(1-['ABS ERROR']/['FORECAST']))

Thanks,

Joe
回复 支持 反对

使用道具 举报

79

主题

430

帖子

606

积分

高级会员

Rank: 4

积分
606
QQ
发表于 2014-3-17 12:28:40 | 显示全部楼层
Jwreford wrote:Hi,

Sorry it would not let me post earlier, here is the code,
if(['ABS ERROR']=0,1,if(&(['ABS ERROR']>0,['FORECAST']=0,(1-['ABS ERROR']/['FORECAST']))

Thanks,

Joe

Try:

Code: ['Destination']=N: If ( ['ABS ERROR'] =0, 1, If ( ( ['ABS ERROR'] > 0 ) & ( ['Forecast'] =0 ), 1- ( ['ABS ERROR']  ['FORECAST'] ), 0 ) );


You need to fill the 'Destination' part with whatever the destination measure is and the final 0 is just a guess on what you will want the result of the ELSE to be.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

80

主题

399

帖子

573

积分

高级会员

Rank: 4

积分
573
QQ
发表于 2014-3-17 12:43:30 | 显示全部楼层
Hi Declan,

Thanks for the above to look like this
['IM ACC DATA Measures':'ACCURACY %']=N:If;(['ABS ERROR']=0,1,If((['ABS ERROR']>0)&(['Forecast']=0),0,1-(['ABS ERROR']['FORECAST']));

But I get the message =N:if;  missing semicolon

Thanks,

Joe
回复 支持 反对

使用道具 举报

94

主题

397

帖子

609

积分

高级会员

Rank: 4

积分
609
QQ
发表于 2014-3-17 14:11:44 | 显示全部楼层
Jwreford wrote:Hi Declan,

Thanks for the above to look like this
['IM ACC DATA Measures':'ACCURACY %']=N:If;(['ABS ERROR']=0,1,If((['ABS ERROR']>0)&(['Forecast']=0),0,1-(['ABS ERROR']['FORECAST']));

But I get the message =N:if;  missing semicolon

Thanks,

Joe

Not sure where you gained the extra semicolon from but you need to take it out. I also missed a bracket from the end of the code i provided.

Code: ['IM ACC DATA Measures':'ACCURACY %']=N:If(['ABS ERROR']=0,1,If((['ABS ERROR']>0)&(['Forecast']=0),0,1-(['ABS ERROR']['FORECAST'])));

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2023-9-25 15:40 , Processed in 0.078218 second(s), 13 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表