10 Replies Latest reply on Nov 6, 2018 8:35 AM by Ombir Rathee

# #EasyQuestion: How to add up natural days for a month since the first registry

Greetings Data Lovers!

I'm trying to create a calculated field to count the number of natural days since the first entry; in other words, I would like to count the number of days between the first registry of the month (in this case 7 Feb 18) till the last day of the month( 28 feb) meaning (28 feb-7 feb=21  days). How can I express that into a calculated field in order to use it for every month?

I attach the workbook in v 10.1. Please feel free to edit it, I'm working in the red sheets.

Thanks for your time!

• ###### 1. Re: #EasyQuestion: How to add up natural days for a month since the first registry

HI Daniel,

Are you looking for # days since first entry ever across everything? Or first entry per driver (and possibly other dimensions)?  Also, do you want to find the last day of the calendar month even if for some reason there is no data for the last day of the month, or do you want the last day of the month for which is there is a record in your data?

Best,

Jennifer

• ###### 2. Re: #EasyQuestion: How to add up natural days for a month since the first registry

Like this?

Thanks

Deepak

If it Helps, Pl mark it Helpful and CORRECT to Close Thread

1 of 1 people found this helpful
• ###### 3. Re: #EasyQuestion: How to add up natural days for a month since the first registry

In case you want to find the number of days between first date and end of month.

• ###### 4. Re: #EasyQuestion: How to add up natural days for a month since the first registry

Hey Jennifer thanks for answering!

I just realised I just need the calculated field for the first of months.

For the first month I'm looking for:

I'm looking to find the last day of the calendar month even if for some reason there is no data for the last day of the month. And, the first day since first entry ever across everything.

For the rest of the months:

I need just normal days (e.g. from 1st March to to 31 March= 31 Days)

Thanks for your time!

• ###### 5. Re: #EasyQuestion: How to add up natural days for a month since the first registry

If that's the case then my answer above will help you.

• ###### 6. Re: #EasyQuestion: How to add up natural days for a month since the first registry

Hey Ombir thanks for answering back again!

I just realised I just need the calculated field for the first of months.

Your answer works perfectly for the first of months

For the rest of the months:

I need just normal days (e.g. from 1st March to to 31 March= 31 Days)

Thanks for your time!

• ###### 7. Re: #EasyQuestion: How to add up natural days for a month since the first registry

What is your definition of first of months ?

First month of year i.e January or First month of year in your dataset i.e February.

• ###### 8. Re: #EasyQuestion: How to add up natural days for a month since the first registry

Check this.

• ###### 9. Re: #EasyQuestion: How to add up natural days for a month since the first registry

Hi Ombir,

Modified Days was exactly what I've been looking for, Thanks a lot. You're the man!

Greetings from Mexico

• ###### 10. Re: #EasyQuestion: How to add up natural days for a month since the first registry

You're Welcome. Please mark answer correct or helpful to close this thread.