user5631397
user5631397

Reputation: 11

SpotFire - How to get cumulative percentage

I need to obtain Cuml % in Spotfire; how to do? Please refer the below data-set

Data Set

Upvotes: 1

Views: 5657

Answers (1)

AmbivalentGeek
AmbivalentGeek

Reputation: 173

You'll want to use the OVER function. I re-created your data table, then inserted three calculated columns:

ActualCuml = Sum([Actual]) OVER (AllPrevious([Day]))
PlannedCuml = Sum([Planned]) OVER (AllPrevious([Day]))
CumlPct = [ActualCuml] / [PlannedCuml]

The first two calculated columns are your rolling sums for Actual and Planned, and then the third column just divides those two new columns to get the cumulative percentage.

You could just insert a single calculated column and use the expressions from the first two as the division factors:

Sum([Actual]) OVER (AllPrevious([Day])) / Sum([Planned]) OVER (AllPrevious([Day]))

Upvotes: 1

Related Questions