请上传宽度大于 1200px,高度大于 164px 的封面图片
    调整图片尺寸与位置
    滚轮可以放大缩小图片尺寸,按住图片拖动可调整位置,多余的会自动被裁剪掉
取消
用户60421570(uid:492747)
职业资格认证:尚未取得认证
  • 大佬们。现在有个需要处理的数据问题遇到瓶颈了,就是当选某个月的某一天的时候要计算月累数据。当选择某月的最后一天则是这个月的所有缺陷类别的数量都可以平铺进来。如图所示。8月28号有个类别 没装到位 却不在31号月累数据填充了,请问是什么原因呢?有没有大佬指点迷津,谢谢!!不胜感激!下方还有部分代码。select   t9.period_id  ,'MTD'as period_type   ,t9.day_format1  ,t9.day_same  ,t9.day_last_month  ,t9.day_last_week  ,t9.month_curr  ,t9.month_same  ,t9.month_last  ,t9.year_curr  ,t9.biz_line_code  ,t9.biz_line_name  ,t9.dim_code              ,t9.dim_name   ,t9.index_name    ,t9.unit  ,t9.index_value   ,t9.statistic_dim       ,t9.data_levelfrom (select t8.period_id,t8.day_format1,t8.day_same,t8.day_last_month,t8.day_last_week,t8.month_curr,t8.month_same,t8.month_last,t8.year_curr,t8.biz_line_code,t8.biz_line_name,t8.dim_code      ,t8.dim_name ,t8.index_name,t8.unit,t8.mtd_value_total as index_value,row_number()over (partition by t8.biz_line_name,t8.period_id order by cast(t8.mtd_value_total as int) desc) as rn,t8.statistic_dim,t8.data_levelfrom (selectt7.gregorian as period_id,replace(t7.gregorian,'-','') as day_format1,t7.day_same,t7.day_last_month,t7.day_last_week,t7.month_curr,t7.month_same,t7.month_last,t7.year_curr,t7.factory_code as biz_line_code,t7.factory_name as biz_line_name,t7.defect_code as  dim_code            ,t7.defect_name as  dim_name ,t7.index_name  ,'/' as unit,nvl(round(t7.index_value,2),0) as index_value,nvl(round(t7.mtd_value,2),0) as   mtd_value_total,nvl(round(t7.ytd_value,2),0) as   ytd_value_total  ,'缺陷类别数量'as statistic_dim     ,'2'as data_level from (select  t6.gregorian,t6.months,t6.years,t6.factory_code,t6.factory_name,t6.defect_code,t6.defect_name,t6.index_value,t6.day_same,t6.day_last_month,t6.day_last_week,t6.month_curr,t6.month_same,t6.month_last,t6.year_curr,t6.index_name,sum(t6.index_value)over( partition by t6.index_name,t6.factory_name ,t6.defect_name,t6.months order by  t6.gregorian) as mtd_value,sum(t6.index_value)over( partition by t6.index_name,t6.factory_name ,t6.defect_name,t6.years  order by  t6.gregorian) as ytd_valuefrom (select a3.gregorian   as gregorian    ,a3.year     as years            ,substr(a3.gregorian,1,7)  as months,t5.factory_code   as factory_code,t5.org_name       as factory_name,t5.defect_type_code   as defect_code,t5.defect_type_name   as defect_name,case when a3.gregorian = t5.inspect_time then t5.unqualified_qty else 0 end  as index_value,a3.day_same        --当日同期(格式:yyyy-MM-dd)   ,a3.day_last_month          --上月当前日期(格式:yyyy-MM-dd),a3.day_last_week --上周当前日期(格式:yyyy-MM-dd),a3.month       as month_curr -- 月,a3.month_same    as month_same -- 月同期,a3.month_last    as month_last -- 月上期        ,a3.year       as year_curr -- 月,'成品开箱合格率'      as index_name from (select * from dim.dim_period where gregorian between'2023-08-01' and  '2023-08-31'and period_type_code = 'D') a3left join (select t1.factory_code,t1.org_name,substr(t1.inspect_time,1,10) as inspect_time,t2.defect_type_code,t3.name as defect_type_name,nvl(sum(case when t1.result  ='NG' then t1.check_qty end ),0)   as unqualified_qtyfrom  dwd.dwd_mf_qm_product_inspection_main  t1 left  join dwd.dwd_mf_product_inspect_sample_detail t2on t2.inspect_main_id = t1.product_inspection_main_idleft join ods.ods_bd_msq_qms_sysm_qms_sysm_t_defect_library  t3on t2.defect_type_code = t3.codewhere t1.org_code in ('KTZSJY','KTZSSY','KTWHJY')and t1.del_flag ='0'and t1.result is not nulland t2.org_code in ('KTZSJY','KTZSSY','KTWHJY')and t3.org_id in ('KTZSJY','KTZSSY','KTWHJY')and t3.belong ='成品检验'and t3.data_source ='reason'and t3.create_id <>'ex_kangsheng.lu'and t1.inspect_time between'2023-08-01' and  '2023-08-31'group by t1.factory_code,t1.org_name,substr(t1.inspect_time,1,10) ,t2.defect_type_code,t3.name)t5--on   a3.gregorian = t5.inspect_timeon 1=1)t6)t7 )t8)t9 where t9.rn <= 5
  • 如图所示:填报表导入数据点提交的时候报错,请问可以怎么处理呢?有没有大佬指点一下?谢谢!!!!
  • 大佬好,请问在hive sql 里可以用什么语句实现这个功能?在每个日期后面有一个滚动近7天的周累计数据?烦请大佬指点!谢谢!!!我网上查了下,用这个语句是否可以?是否大佬有其他思路和想法,谢谢!,sum(x.today_users) over (partition by x.website, x.country_id, x.product_id  order by x.date asc rows between 7 preceding and 1 preceding) as past_7d_users
  • 标签数值的颜色为何都展示为白色呢?设置了两个条件属性,一个是折线图颜色,一个是设置不同的数值展示的样式情况(小于1保留2位小数),为何设置了之后就数值就不能高亮了呢(第一张图)?烦请大佬赐教,谢谢~!!!
  • 在帆软报表连接oracle数据库时候,某个字段做成筛选框,全选的时候超过1000个就会报错,请问大佬们这个可以怎么处理?辛苦了,谢谢~
  • 如图所示数据,想要截取这个字符串里面的-1前面的数据,P230110000924-1-1 比如 只要 P230110000924,这一段,请问可以用sql怎么处理呢?是否有大神可以帮忙指点一下,谢谢,辛苦了~
  • 如图所示请问数值是上面那个,但是用如下代码转成百分比的时候,部分百分数不是保留2位小数,请问这是什么原因呢?有没有大佬帮忙解决一下,辛苦了,谢谢~case when t3.main_machine_prodt_schedule_qty_cumulative = 0 then '0.0%' else (concat(round((t3.main_machine_prodt_schedule_qty_cumulative/t3.prodt_schedule_qty_cumulative),2)*100,'%')) end as cumulative_ratio_percent--累计占比百分比
  • 预览报错是这样的;数据集是这样写的,这样写是否有问题呢?但是mysql那里预览是没有问题的。预览的时候允许为空可以怎么写参数呢?是否有大佬可以指点赐教一下,谢谢~!
  • 如图是这样的下拉筛选框,想在数据集里面对中心或者指标名称做权限控制。比如一部分的权限是开放到某个中心可查看,一部分的权限是开放到某个中心的某些指标可看,请问有什么方法可以实现吗?烦请大佬指点赐教,谢谢~
  • 比如数值是<1的保留2位小数,数值>=1and <=10保留1位小数,数值>10以上的取整?请问在报表内可以设置吗?在数据集里面设置的话,比如1.97则四舍五入为2,但想要保留那个0,希望可以显示2.0。有没有大佬可以指教一下,谢谢!!!

18

2

18

10

12下一页
个人成就
内容被浏览5,848
加入社区4年15天
返回顶部