问题
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?
回答1:
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 :)
回答2:
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:
So it looks like your expression is wrong.回答3:
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 :)
来源:https://stackoverflow.com/questions/19297965/spotfire-visualization-over-in-a-running-total-gets-blank-values