5 Replies Latest reply on Jun 8, 2012 5:48 AM by Russell Christopher

# Normalize Dates

We have a group of wells we would like to compare production on a "time zero" basis.  That is, I'd like to see all first months lined up, etc.  Any suggestions?

• ###### 1. Re: Normalize Dates

Hi Debprah!

I'd suggest you create a calculation which uses DateDiff(() to compare the date the well started producing for you and the current month - Doing so will give you a number you can use to normalize. I'm unclear what fields you have to work with, but your calculation might look something like this:

DateDiff("month", min([Date]), Now())

Have fun!

• ###### 2. Re: Normalize Dates

Thanks, Russell.  Definitely having fun!

This calculation is on the right track but not quite right.  I tried reversing but that didn't give me what I needed either.  I have a date of production by month.  I need to show these as month # instead (i.e. month 1, 2, 3, etc.).  The calc above gave me the months by number, but in reverse (plotted month 1 last).  Suggestions?  I'm a real novice at all the calculation possibilities.

• ###### 3. Re: Normalize Dates

Interesting you're getting 1 last!

Why don't you just do a sort on your calculation?

For whatever reason, I'm seeing a 1-12 sort, but let's pretend I have 12-1:

• Click the blue Calculation1 "pill" on the Columns shelf, and select "Sort" from the menu item that appears
• Choose the Ascending Radio button, and then your calculation name in the Field drop-down
• Click OK, and you should be good
• ###### 4. Re: Normalize Dates

For some reason, when I entered my calc field, It shows AGG(NormDate) and it was green.  I changed it to discrete to be able to sort, but it only gives me the choice of data source order or manual.  Using a line graph to compare the various wells.

• ###### 5. Re: Normalize Dates

If you used my earliest suggestion verbatim-ish, you're seeing "Agg" because the expression you wrote uses "Min" (an aggregate function). Your manual sort looks good to me, or you might just want to try removing min() since not sure it's altogether necessary - I was guessing based on what you were trying to do and and what I thought your data might look look like.