Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

Calculating days per maintenance


Alan Ye

Recommended Posts

Hello,

 

I was wondering if there was any way to get this desired result:

 

 

 

Asset Name

Start

End

Days

Down Reason

 

 

MISSISSIPI K #2

9/7/2014

11/1/2014

56

TC

 

 

MISSISSIPI K #2

1/3/2015

1/5/2015

3

BO

 

 

MISSISSIPI K #2

2/24/2015

2/25/2015

2

TC

 

 

MISSISSIPI K #2

3/2/2015

3/27/2015

26

BO

 

 

MISSISSIPI K #2

5/3/2016

5/9/2016

7

RP

 

 

MISSISSIPI K #2

9/26/2016

10/24/2016

29

RP

 

 

 

 

This is an example of the way the data is structured:

 

 

 

Asset Name

PROD_DATE

Down Reason

 

 

FIREFLY #3

6/6/2015 0:00

RP

 

 

FIREFLY #3

6/7/2015 0:00

RP

 

 

FIREFLY #3

6/8/2015 0:00

RP

 

 

FIREFLY #3

6/9/2015 0:00

RP

 

 

FIREFLY #3

9/9/2015 0:00

RP

 

 

FIREFLY #3

10/7/2015 0:00

FL

 

 

FIREFLY #3

6/26/2016 0:00

TC

 

 

FIREFLY #3

6/27/2016 0:00

TC

 

 

FIREFLY #3

6/28/2016 0:00

TC

 

 

FIREFLY #3

6/29/2016 0:00

TC

 

 

FIREFLY #3

6/30/2016 0:00

TC

 

 

FIREFLY #3

7/1/2016 0:00

TC

 

 

FIREFLY #3

7/2/2016 0:00

TC

 

 

FIREFLY #3

7/3/2016 0:00

TC

 

 

FIREFLY #3

7/4/2016 0:00

TC

 

 

FIREFLY #3

7/5/2016 0:00

TC

 

 

FIREFLY #3

7/6/2016 0:00

TC

 

 

FIREFLY #3

7/7/2016 0:00

TC

 

 

FIREFLY #3

7/8/2016 0:00

TC

 

 

FIREFLY #3

7/9/2016 0:00

TC

 

 

FIREFLY #3

7/10/2016 0:00

TC

 

 

FIREFLY #3

7/11/2016 0:00

TC

 

 

FIREFLY #3

7/12/2016 0:00

TC

 

 

 

There are multiple assets, and multiple repeating [Down Reason] per asset. Does anyone have any possible solution

Link to comment
Share on other sites

Just to clarify, would the output from your sample data look like this Name    Start        End    Days    Down Reason

FIREFLY    6/6/15        9/9/15    90    RP

FIREFLY    10/7/15        10/7/15    1    FL

FIREFLY    6/26/2016    7/12/16    17    TC

Link to comment
Share on other sites

×
×
  • Create New...