简体   繁体   English

Spotfire可视化-在运行总计中获得空白值吗?

[英]Spotfire visualization - Over in a running total gets blank values?

I have built a bar chart visualization with Spotfire that includes the use of the Over function to give a running total. 我已经使用Spotfire构建了条形图可视化效果,其中包括使用Over函数来提供运行总计。 Months are on the X axis and counts are on the Y axis. 月在X轴上,计数在Y轴上。 My data set contains months where there were no values. 我的数据集包含没有值的月份。 When I graph that there is no bar although a running total should still contain a value although zero was added for that month. 当我绘制图形时,尽管该月添加了零,但运行总计仍应包含一个值,但没有柱线。

How do I get a month with no value to still show a bar for that month? 如何获得一个没有价值的月仍显示该月的柱线?

Yes, You can try Count() OVER (AllPrevious([Axis.X])), this will work for bar chart and line chart. 是的,您可以尝试Count()OVER(AllPrevious([Axis.X])),这将适用于条形图和折线图。 or if you r using 55.0 and above version you can use Cummulative function which is inbulit is recent versions. 或者,如果您使用的是55.0及更高版本,则可以使用累计功能,该功能是最新版本。 Hope this help :) 希望这个帮助:)

Here is my data set (note the 2 missing values): 这是我的数据集(请注意缺少的两个值):

Month   Value
Jan-14  1
Feb-14  2
Mar-14  
Apr-14  
May-14  5
Jun-14  6
Jul-14  7
Aug-14  8
Sep-14  9
Oct-14  10
Nov-14  11
Dec-14  12

Here is my expression (taken from the built in Cumulative function): 这是我的表达式(取自内置的累积函数):

Sum([Value]) THEN Sum([Value]) OVER (AllPrevious([Axis.X]))

Here is my result: 这是我的结果:

Spotfire图 So it looks like your expression is wrong. 所以看来您的表达是错误的。

since I saw this old topic and didn´t find a solution at first, there it is: 因为我看到了这个老话题,但最初没有找到解决方案,所以它是:

the formula is good, but displaying the months with no values is an option of the bar chart itself. 公式很好,但是显示无值的月份是条形图本身的一个选项。

Go to the bar chart " Properties ", then " Appearance ", then at the bottom of the window: tick the box "Compensate for missing values". 转到条形图“ 属性 ”,然后“ 外观 ”,然后在窗口底部:选中“补偿缺失值”框。

Hope this will prevent next users from searching in the future :) 希望这可以防止以后的用户继续搜索:)

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

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