简体   繁体   中英

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. Months are on the X axis and counts are on the Y axis. 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. or if you r using 55.0 and above version you can use Cummulative function which is inbulit is recent versions. 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 :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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