yhdata_e9DsCeBY玄铁三
2024-11-26 09:59:23 发布在问答
【报错信息处理】 二次计算的计算列报错
对于在报表中计算出来的结果再次计算时就报错,而其他数据集内的字段同样的公式就不报错
1732586297433.jpg
401
7
精彩评论7
yhdata_lyaa
发表于 2024-11-26 10:16:00 显示全部楼层
什么类型的字段,做的什么计算,还有报错看不清楚,重新上传一下截图呢
回复

使用道具 2#

yhdata_e9DsCeBY玄铁三
发表于 2024-11-26 10:23:12 显示全部楼层
yhdata_lyaa 发表于 2024-11-26 10:16
什么类型的字段,做的什么计算,还有报错看不清楚,重新上传一下截图呢

对保单号去重算件数,再卡时间条件对件数进行不同的展示
1732587766513.jpg
回复

使用道具 3#

yhdata_e9DsCeBY玄铁三
发表于 2024-11-26 10:25:55 显示全部楼层
执行数据失败
错误代码 110099999
错误:预览:货运险承保统计表-副本,组件;图表1,数据集;:44444,列;件数环比,missing;before statement ([script]#1)
回复

使用道具 4#

yhdata_lyaa
发表于 2024-11-26 10:26:41 显示全部楼层
yhdata_e9DsCeBY 发表于 2024-11-26 10:25
执行数据失败
错误代码 110099999
错误:预览:货运险承保统计表-副本,组件;图表1,数据集;:44444,列; ...

写了什么脚本
回复

使用道具 5#

yhdata_e9DsCeBY玄铁三
发表于 2024-11-26 10:59:56 显示全部楼层
yhdata_lyaa 发表于 2024-11-26 10:26
写了什么脚本

col[policy_qty],是对policynum保单号进行了去重计数
IMG_20241126_105835.jpg
回复

使用道具 6#

yhdata_e9DsCeBY玄铁三
发表于 2024-11-26 11:02:59 显示全部楼层
case when Substr(param["统计日期1”],6,5)='01-01'
and Substr(param["统计日期2”],6,5)-'12-31'
and Substr(param["统计日期1"],1,4)- Substr(param["统计日期2“],1,4)
Case
when col['stat_date']
end
BETWEEN add_months (param["统计日期1”],-12)and add_months(param["统计日期2”],-12)then col['policy_qty']
when Substr(param["统计日期1"],9,2)-'01'
and Substr(param["统计日期2“],9,2)=
substr(cast (LAST_day (param["统计日期2"]) asstring),9,2)
case
when cast(substr(param["统计日期2"],6,2) as int)-cast(substr(param["统计日期1"1,6,2) as int)>0
then
Case
when col['stat_date'] BETWEEN
add_months (param["统计日期1"1,-1*(cast(substr(param["统计日期2"1,6,2) as int)-cast(substr(param["统计日期1"],6,2) as int)+
)) and
add months(param["统计日期2"1,1*(oast(substr(param["统计日期2"],6,2) as int)-cast(substr(param[“绕计日期1"],6,2) as int)+
end
then col['policy_qty']
when cast(substr(param["统计日期2"1,6,2) as int)-cast(substr(param["统计日期1"1,6,2) as int)<o
then
Case
when col['stat_date ] BETWEEN
+127) and
add_months (param["统计日期1”],1*(cast(substr(param["统计日期2"],5,2) as int)-cast(substr(param["统计日期1”1,6,2) as int)add_ months (param["统计日期2"1,-1*(cast(substr(param["统计日期2"1,6,2) as int)-cast(substr(param["统计日期1"],6,2) as int)+12))
then col['policy_qty']
end
end
else null
end
回复

使用道具 7#

yhbi老6了铂金二
发表于 2024-11-26 13:13:05 显示全部楼层
我丢?代码山?无缩进?新来的维护看一眼,直接跑了。review的同事骂骂咧咧
回复

使用道具 8#

高级模式
您需要登录后才可以回帖 登录 | 免费注册

  • 官方微信

    欢迎关注永洪服务号!收费为0,价值无限

    扫码关注
  • 新浪微博

    让每位用户轻松挖掘数据价值!

    访问新浪微博
  • 智能客服
100W

用户等你来哦

Copyright   ©2012-2025  北京永洪商智科技有限公司  (京ICP备12050607) 京公网安备110110802011451号 |《永洪社区协议》
返回顶部