spotfire- how to find create a column to calculate the time of next stage -


i want create calculated column show time action end grouped [case id], [stage], , [action]. order of stage not necessary alphabetic , duplicated. after [stage] 'c', have [stage] 'c' in future

thanks,

enter image description here

thanks updated test data. data types extremely important when asking. also, test data should mirror actual data close possible, otherwise solutions not scale. example, in test data values time. sorting on time doesn't take account day, it's treated equally. since these values datetime, have added test data. these expressions give expected results identified in question.

  1. rank([time_action_begin],"asc",[case id]) [rank]
  2. min([time_action_begin]) on (intersect([case id],next([rank])))

results

+---------+-------+----------+------------------------+------------------------+------+ | case id | stage |  action  |   time_action_begin    |    time_action_end     | rank | +---------+-------+----------+------------------------+------------------------+------+ |       1 |     | approve  | 01/01/2016 11:30:00 pm | 01/02/2016 12:30:00 |    1 | |       1 |     | approve  | 01/01/2016 11:30:00 pm | 01/02/2016 12:30:00 |    1 | |       1 | b     | approve  | 01/02/2016 12:30:00 | 01/02/2016 1:30:00  |    3 | |       1 | b     | approve  | 01/02/2016 12:30:00 | 01/02/2016 1:30:00  |    3 | |       1 | c     | approve  | 01/02/2016 1:30:00  | 01/02/2016 2:30:00  |    5 | |       1 | c     | approve  | 01/02/2016 1:30:00  | 01/02/2016 2:30:00  |    5 | |       1 | d     | approve  | 01/02/2016 2:30:00  | 01/02/2016 3:30:00  |    7 | |       1 | d     | approve  | 01/02/2016 2:30:00  | 01/02/2016 3:30:00  |    7 | |       1 | e     | approve  | 01/02/2016 3:30:00  | 01/02/2016 4:30:00  |    9 | |       1 | e     | approve  | 01/02/2016 3:30:00  | 01/02/2016 4:30:00  |    9 | |       1 | f     | complete | 01/02/2016 4:30:00  | 01/02/2016 5:30:00  |   11 | |       1 | f     | complete | 01/02/2016 4:30:00  | 01/02/2016 5:30:00  |   11 | |       1 | c     | approve  | 01/02/2016 5:30:00  |                        |   13 | |       1 | c     | approve  | 01/02/2016 5:30:00  |                        |   13 | |       2 |     | approve  | 01/01/2016 10:30:00 pm | 01/02/2016 12:30:00 |    1 | |       2 |     | approve  | 01/01/2016 10:30:00 pm | 01/02/2016 12:30:00 |    1 | |       2 | b     | approve  | 01/02/2016 12:30:00 | 01/02/2016 2:30:00  |    3 | |       2 | b     | approve  | 01/02/2016 12:30:00 | 01/02/2016 2:30:00  |    3 | |       2 | c     | approve  | 01/02/2016 2:30:00  | 01/02/2016 3:30:00  |    5 | |       2 | c     | approve  | 01/02/2016 2:30:00  | 01/02/2016 3:30:00  |    5 | |       2 | d     | approve  | 01/02/2016 3:30:00  | 01/02/2016 4:30:00  |    7 | |       2 | d     | approve  | 01/02/2016 3:30:00  | 01/02/2016 4:30:00  |    7 | |       2 | e     | approve  | 01/02/2016 4:30:00  | 01/02/2016 5:30:00  |    9 | |       2 | e     | approve  | 01/02/2016 4:30:00  | 01/02/2016 5:30:00  |    9 | |       2 | f     | complete | 01/02/2016 5:30:00  | 01/02/2016 6:30:00  |   11 | |       2 | f     | complete | 01/02/2016 5:30:00  | 01/02/2016 6:30:00  |   11 | |       2 | c     | approve  | 01/02/2016 6:30:00  |                        |   13 | |       2 | c     | approve  | 01/02/2016 6:30:00  |                        |   13 | +---------+-------+----------+------------------------+------------------------+------+ 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -