Spotfire/How to sum qty in step order

19 Views Asked by At

Here's the data. All items start with A001 and end with A100. A100 is a shipped step. enter image description here

The quantity that needs to be shipped per month is fixed like 50 in septemmber,10 in October, 22 in November.

So what I want to do is

Calculate the "Supply month" column.

I'd like to express how many items in each step corresponds to the monthly supply like this enter image description here

The algorithm I thought of is as follows

  1. Sort the steps in reverse order using 'rank' function in calculated column.

  2. Count QTY from A100 and cut it off if it's 50,10,22

But I'm getting stuck from 2. I don't know how to use the count function after sorting the steps. I need your help

Sorting steps using RANK

0

There are 0 best solutions below