我列出了很少的视图,并且每当用户选择一个视图时,都需要从现场射击的交叉表可视化中排除几列。我是新来的人,所以正在寻找任何方法或Iron python脚本来执行相同的操作
您的报告示例将有助于提供更好的答案。
如果可以将选定的视图作为文档属性传递,则当该文档属性更改时,将触发python脚本,将交叉表作为参数以及该文档属性拉入,并根据需要更改轴表达式。示例脚本如下:
from Spotfire.Dxp.Application.Visuals import *
from Spotfire.Dxp.Data import *
myVis = myVis.As[Visualization]()
if viewSelected == "View A":
# Horizontal:
myVis.ColumnAxis.Expression = "<[Column 1]>"
# Vertical:
myVis.RowAxis.Expression = "<[Column 2] NEST [Column 3]>"
# Cell values:
myVis.MeasureAxis.Expression = "Sum([Actual]), Sum([Forecast])"
elif viewSelected == "View B":
# Horizontal:
myVis.ColumnAxis.Expression = "<[Column 4]>"
# Vertical:
myVis.RowAxis.Expression = "<[Column 5] NEST [Column 6]>"
# Cell values:
myVis.MeasureAxis.Expression = "Sum([Plan]), Sum([Difference])"
else:
# Horizontal:
myVis.ColumnAxis.Expression = "<[Column 7]>"
# Vertical:
myVis.RowAxis.Expression = "<[Column 8] NEST [Column 9]>"
# Cell values:
myVis.MeasureAxis.Expression = "Sum([Forecast]), Sum([Plan])"