Forum Discussion

Lamao's avatar
Lamao
Frequent Visitor
8 years ago

Count items between two dates (stored as status)

Hello,

 

I have list of facilities which has been active during only some periods - the format (sample) of table is:

 

FacilityIDDateFromStatus
1232017-10-010
1232017-01-01 1
1232018-02-01 0
1232018-01-01 1

 

What I would like to achieve is:

 

PeriodCount of active facilities
2017-011
2017-021
2017-031
2017-041
2017-051
2017-061
2017-071
2017-081
2017-091
2017-100
2017-110
2017-120
2018-011
2018-020

 

Thank you for any ideas / tips how to achieve this!

 

 

 

2 Replies

  • Lamao's avatar
    Lamao
    Frequent Visitor

    Hello,

     

    I have list of facilities which has been active during only some periods - the format (sample) of table is:

     

    FacilityIDDateFromStatus
    1232017-10-010
    1232017-01-01 1
    1232018-02-01 0
    1232018-01-01 1

     

    What I would like to achieve is:

     

    PeriodCount of active facilities
    2017-011
    2017-021
    2017-031
    2017-041
    2017-051
    2017-061
    2017-071
    2017-081
    2017-091
    2017-100
    2017-110
    2017-120
    2018-011
    2018-020

     

    Thank you for any ideas / tips how to achieve this!