-
-
养蚯蚓吃沙漠 小试身手Lv3
发表于2020-11-19 18:25
悬赏100
未解决

当切换参数计算时,区域2仍然会把上次热区传过来的参数计算进去,如何设置能不让上次热区传递的参数影响到下次计算
23个回答
为啥这个表样里没有看到您设置的热区钻取呀
本帖最后由 xxxl 于 2020-11-20 14:42 编辑
刚才尝试了一下,感觉您这里第二次设置完参数之后依然显示上次的值,应该是需要在热区区域中加上带有判空是默认值的过滤条件才行。在不设置默认值条件的情况下它可能会按照上一次传的值再做过滤,
这里将热区过滤条件从简单的主题表字段=@参数名称,改成if(@参数名称 is null,dim(主题表字段)='A0000',dim(主题表字段)=@参数名称), 中间的dim(主题表字段)='A0000' 就是当热区参数传过来为空的时候 值为A0000,也可以写成'1=1'等
xxxl 发表于 2020-11-20 14:38
刚才尝试了一下,感觉您这里第二次设置完参数之后依然显示上次的值,应该是需要在热区区域中加上带有判空 ...
我的表里也配的有参数为空默认的过滤
这里出现问题是因为BI记录了上次传的参数,所以执行了 if语句的另一半判断

xxxl 发表于 2020-11-20 14:38
刚才尝试了一下,感觉您这里第二次设置完参数之后依然显示上次的值,应该是需要在热区区域中加上带有判空 ...
而且是 同样的报表,同样的条件在bi4.2的环境中,是不存在上述的问题的
xxxl 发表于 2020-11-20 14:38
刚才尝试了一下,感觉您这里第二次设置完参数之后依然显示上次的值,应该是需要在热区区域中加上带有判空 ...
BI4.7的版本是这个:
企业版 V4.7.1_YYZWR9-build20191113135038-r6c0d13b
本帖最后由 养蚯蚓吃沙漠 于 2020-11-20 16:28 编辑
xxxl 发表于 2020-11-20 16:09
可以再发一下切换参数前和切换参数后的详情sql吗
第一次计算没有点热区式前:

sql 见附件1;
之后点击钻取,会把上方的@cs热区钻取传递到下方区域

sql见附件2;
之后切换 参数区参数 决算口径为政府性基金 :

SQL见附件3



这次我是把下方区域涉及到计算的图表都删除了,只涉及到热区式传参