# Calculate runtime of projects

Imagine you have a node that contains data of different projects and you want to know for each project when it starts, and the runtime at each point in time. You can easliy combine some operations to obtain the desired result.

Node 'Project Data':

Project

2018

2019

2020

2021

2022

Project A

-100

20

10

Project B*

-10

10

Project C

-80

9

10

10

1

*Project B has no value in 2020

First, we calculate all points in time where a project is actually active.

Z = IF('Project Data',1) =

Project

2018

2019

2020

2021

2022

Project A

1

1

1

Project B

1

1

Project C

1

1

1

1

1

R = IF('Project Data', RUNNINGSUM(IF('Project Data',1))) =

Project

2018

2019

2020

2021

2022

Project A

1

2

3

Project B

1

2

Project C

1

2

3

4

5

To get a node without any time level, and just the Total Runtime of each project, you may use:

DROPLEVEL('R',"Year","MAX")

or

DROPLEVEL('Z',"Year","SUM")

to get:

Project

Value

Project A

3

Project B

2

Project C

5

JavaScript errors detected

Please note, these errors can depend on your browser setup.