简体   繁体   English

Spotfire折线图平滑

[英]Spotfire Line Chart Smoothing

Download my .dxp dashboard here . 在此处下载我的.dxp仪表板。

I have a line chart in Spotfire. 我在Spotfire中有一个折线图。 On the x-axis is date and the y-axis is an amount. 在x轴上是日期,在y轴上是金额。 Specifically, it's the weighted average of a minimum amount for each date on x-axis. 具体来说,它是x轴上每个日期的最小金额的加权平均值。 The y-axis expression is y轴表达式为

WeightedAverage(
                [NUMERIC_1] , 
                 Min([NUMERIC_2]) over (Intersect([CAT_1],[CAT_2],[CAT_3]))
                )

The line is very jumpy so I'd like to smooth it. 这条线跳得很紧,所以我想使它平滑。 I thought of using the moving average expression, perhaps using a 7-day moving average. 我考虑使用移动平均线表达,也许使用7天移动平均线。 However, I'm not sure how to nest my WeightedAverage function (shown above) in the MovingAverage function because that's also a compound function. 但是,我不确定如何将我的WeightedAverage函数(如上所示)嵌套在MovingAverage函数中,因为这也是一个复合函数。

Any ideas on how to smooth my line chart? 关于如何平滑折线图的任何想法?

The following is a solution: 以下是解决方案:

WeightedAverage([Weighting Factor],Min([NUMERIC_1]) over (Intersect([CAT_1],[CAT_2],[DATE_1]))) 
THEN Avg([Value]) OVER (LastPeriods(10,[Axis.X]))
THEN If(Count() OVER (LastPeriods(10,[Axis.X]))=10,[Value],null)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM