Hi,
I need to count number of months that occur over a specific date range that fall in a specified year and the date ranges could be 1.1.2016 to 1.10.2017 and i'm only interested in months that occur in 2017, also the date formats used in the raw data spreadsheet source are typically in the format yyyy mm (2016 10), and typically get a number of entries that have a start of say 2017 10 and end date 2017 10 which should equal 1 month. example below.
Start Date Endate Duration 2017 MTH COUNT
2015 10 2018 09 36 12
2017 07 2017 07 1 1
2017 01 2017 12 12 12
2017 07 2017 09 3 3
2017 04 2017 04 1 1
2017 02 2017 12 11 11
2017 09 2017 12 4 4
2017 06 2020 05 36 12
2017 12 2017 12 1 1
2015 05 2017 04 24 4
2017 03 2017 03 1 1
2015 04 2017 04 25 4
2017 11 2017 11 1 1
2017 11 2017 11 1 1
2017 08 2018 07 12 5
2017 10 2017 10 1 1
2017 09 2017 09 1 1
2017 07 2018 06 12 6
There is another part to this calculation where the number of months are multiplied by a unit value, but have managed to crack that one... any help would be appreciated.
I need to count number of months that occur over a specific date range that fall in a specified year and the date ranges could be 1.1.2016 to 1.10.2017 and i'm only interested in months that occur in 2017, also the date formats used in the raw data spreadsheet source are typically in the format yyyy mm (2016 10), and typically get a number of entries that have a start of say 2017 10 and end date 2017 10 which should equal 1 month. example below.
Start Date Endate Duration 2017 MTH COUNT
2015 10 2018 09 36 12
2017 07 2017 07 1 1
2017 01 2017 12 12 12
2017 07 2017 09 3 3
2017 04 2017 04 1 1
2017 02 2017 12 11 11
2017 09 2017 12 4 4
2017 06 2020 05 36 12
2017 12 2017 12 1 1
2015 05 2017 04 24 4
2017 03 2017 03 1 1
2015 04 2017 04 25 4
2017 11 2017 11 1 1
2017 11 2017 11 1 1
2017 08 2018 07 12 5
2017 10 2017 10 1 1
2017 09 2017 09 1 1
2017 07 2018 06 12 6
There is another part to this calculation where the number of months are multiplied by a unit value, but have managed to crack that one... any help would be appreciated.