How to calculate polynomial trendline x value when using a date?

So I have a chart that I have created in Numbers, with a trendline using a polynomial function, and I've got it to display the formula, but I cannot for the life of me, figure out what `x` value I'm supposed to use to get the resulting `y` value!



`x` is a date / time, so clearly it must be something related to the date value. But I've tried using ms since the unix epoch, secs since the unix epoch, etc. each to no avail. Some "other" spreadsheet tools make it clear how they convert dates into numbers when creating polynomial trendlines, Numbers however, does not.



Does anyone know what value I am supposed to use!?



For those that might not be able to read the graph easily, an `x` value of 01/01/2019 00:00:00 should give a `y` value of 1,000~.


User uploaded file

MacBook Pro TouchBar and Touch ID, macOS High Sierra (10.13.4), null

Posted on Apr 13, 2018 1:40 AM

Reply
5 replies

Apr 13, 2018 3:05 AM in response to Yellowbox

Hi Ian,


Thanks for your prompt reply, the data I'm using to generate the chart is really simple:

User uploaded file

Then I'm using the Trendline - Polynomial option to create the line, with the "Show Equation" checkbox ticked.


What I really need to be able to do, is be able to get a Y value for a given date. The equation should give me this, but the problem is, X is a date, so I have no idea how to convert the date into a numeric that can be used in the equation! It's like I need to know how Numbers is converting it, to know how I need too...?

Apr 13, 2018 3:02 AM in response to Siyfion

Hi Siyfion,


Please post a screen shot of the data table.

What date format are you using? It looks like dd/mm/yyyy with a default time as midnight.


Just to kick off the discussion, I had a play with converting each date to a Duration (days) from the starting date:

User uploaded file

Or you might try DUR2DAYS to convert a Duration to a Number and use that column as the X values.

User uploaded file

More information will lead to a solution 😉.


Regards,

Ian.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to calculate polynomial trendline x value when using a date?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.