各季度销售额的直方图如下所示:


Spotfire调试经验——嵌套使用Over函数各选项实现动态同比分析(Dynamic period-over-period compare in Spotfire)


问题:如何展现出各时间段内(年、季度、月、星期、天、小时、分、秒)以其上一层级为分组单位的累计销售额相比上一期同时间段的变化情况?

解决方案:单击图标左侧Y轴销售额,编辑公式为“(Sum([Sales Total]) OVER(Intersect(Parent([Axis.X]),AllPrevious([Axis.X]))) / Sum([Sales Total]) OVER(Intersect(Parent(ParallelPeriod([Axis.X])),AllPrevious(ParallelPeriod([Axis.X])))))- 1”,即可实现该要求。


Spotfire调试经验——嵌套使用Over函数各选项实现动态同比分析(Dynamic period-over-period compare in Spotfire)


随想:面对比较复杂的业务需求,除了知识、经验外,还要肯动脑筋、肯吃苦(调试代码、数据校验都是比较耗脑力及体力的活动),当然,你还需要信念:必须想尽一切办法来实现这个需求!


参考资料:

https://www.datafuel.co/spotfire-over-function-examples-within-custom-expressions-of-visualizations/

相关文章:

  • 2021-09-03
  • 2022-01-12
  • 2021-06-29
  • 2021-09-16
  • 2022-12-23
  • 2021-10-09
  • 2021-08-06
猜你喜欢
  • 2021-05-10
  • 2021-04-15
  • 2021-12-28
  • 2021-07-30
  • 2021-05-15
  • 2021-12-17
  • 2021-12-12
相关资源
相似解决方案