<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sum totals by month from date field in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1354#M1354</link>
    <description>Well you can use the Year function to get a column containing the year. Then you can model by Year and Week. Or you can make a value like your 200940 by creating a new column whose values are Year*100 + Week if that's what you want. There is no JMP format which displays a date as YYYYWW.</description>
    <pubDate>Fri, 12 Mar 2010 15:33:04 GMT</pubDate>
    <dc:creator>mpb</dc:creator>
    <dc:date>2010-03-12T15:33:04Z</dc:date>
    <item>
      <title>Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1347#M1347</link>
      <description>Is there a simple way to create sum totals by month?  I have a date field such as 01Apr2008 and I would like to tabulate by month.&lt;BR /&gt;&lt;BR /&gt;I can display the date as only a month-year, such as 4/2008, but I can't use the tabulate function as it does it by day based on the underlying data.</description>
      <pubDate>Thu, 11 Feb 2010 18:23:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1347#M1347</guid>
      <dc:creator>rossmiller</dc:creator>
      <dc:date>2010-02-11T18:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1348#M1348</link>
      <description>I am not sure exactly what you want but you could make a month-only variable by adding a new column with the simple formula &lt;BR /&gt;&lt;BR /&gt;Month(:Date)   //assuming Date is the name of your date column&lt;BR /&gt;&lt;BR /&gt;This will yield a numeric column with numbers 1-12. These can be recoded (use e.g. Recode in the Cols menu) to Jan-Dec if you prefer that. Use this column with Summary or Tabulate to get monthly statistics. &lt;BR /&gt;&lt;BR /&gt;However, if you want summarize by both month and year then you could also make a Year(:Date) column and then group after both columns. &lt;BR /&gt;&lt;BR /&gt;Alternatively make a a combined column with the formula (choose format m-y to avoid showing the date)&lt;BR /&gt;&lt;BR /&gt;Date DMY( 1, Month( :Date ), Year( :Date ) ) &lt;BR /&gt;&lt;BR /&gt;Or by concatenating the month and year columns I described above using the column formula&lt;BR /&gt;&lt;BR /&gt;Char( :Month ) || "-" || Char( :Year )&lt;BR /&gt;&lt;BR /&gt;The last example gives a nominal month-year though, which may or may not be desired.</description>
      <pubDate>Thu, 11 Feb 2010 20:21:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1348#M1348</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-02-11T20:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1349#M1349</link>
      <description>that did the trick, thanks!</description>
      <pubDate>Fri, 19 Feb 2010 22:33:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1349#M1349</guid>
      <dc:creator>rossmiller</dc:creator>
      <dc:date>2010-02-19T22:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1350#M1350</link>
      <description>I think I just came up with a more elegant solution in a similar recent thread. I thought the problem seemed familiar, that I've been digging in to this not long ago. How ephemeral memory is! Glad you've found a solution.</description>
      <pubDate>Fri, 19 Feb 2010 22:53:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1350#M1350</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-02-19T22:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1351#M1351</link>
      <description>Can you post or link to the more elegant solution.  I'm trying to do something similiar with "Week-Year"&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Mon, 08 Mar 2010 20:02:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1351#M1351</guid>
      <dc:creator />
      <dc:date>2010-03-08T20:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1352#M1352</link>
      <description>There is a Week of Year function which assumes weeks begin on Sunday so you may get a week fragment at the beginning and another one (week 53) at the end of a year.&lt;BR /&gt;&lt;BR /&gt;There is a Day of Year function which can be used to calculate a different Week of Year value which starts a full 7 day week on the first day of the year. There will be a 1 or 2 day week 53 fragment at the end of the year. That formula is:&lt;BR /&gt;&lt;BR /&gt;Floor( (Day Of Year( :Date ) - 1) / 7 ) + 1&lt;BR /&gt;&lt;BR /&gt;One way or the other you will have a new column of weeks of the year.&lt;BR /&gt;&lt;BR /&gt;Message was edited by: mpb</description>
      <pubDate>Tue, 09 Mar 2010 19:45:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1352#M1352</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-09T19:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1353#M1353</link>
      <description>Right -  I'm actually trying to create a new variable that includes YEAR &amp;amp; WEEK of YEAR.  The goal is to look at trends by WEEK across YEARS.  &lt;BR /&gt;&lt;BR /&gt;So we'd lke to get something like YYYWW or 200940.  The variable needs to be stored as a numeric variable ideally.</description>
      <pubDate>Thu, 11 Mar 2010 21:00:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1353#M1353</guid>
      <dc:creator />
      <dc:date>2010-03-11T21:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1354#M1354</link>
      <description>Well you can use the Year function to get a column containing the year. Then you can model by Year and Week. Or you can make a value like your 200940 by creating a new column whose values are Year*100 + Week if that's what you want. There is no JMP format which displays a date as YYYYWW.</description>
      <pubDate>Fri, 12 Mar 2010 15:33:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1354#M1354</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-12T15:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1355#M1355</link>
      <description>i am doing something similar to that described by MS (actually working out average yields by month) and haven't yet found a nicer way.&lt;BR /&gt;&lt;BR /&gt;unfortunately, if i want to plot a bar chart with months as the x-axis and there are months with no data, then that month doesn't get plotted at all, so to make sure there's an empty month in my chart i have to create dummy empty rows, and i'm sure there should be a better way than that!</description>
      <pubDate>Tue, 16 Mar 2010 15:48:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1355#M1355</guid>
      <dc:creator>matthewh</dc:creator>
      <dc:date>2010-03-16T15:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Sum totals by month from date field</title>
      <link>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1356#M1356</link>
      <description>If you can live with month numbers (1-12) and you don't mind creating a summary table of average yields by month, then with a little effort you can do what you want using Overlay Plot.&lt;BR /&gt;&lt;BR /&gt;Plot Avg Yield versus Month.&lt;BR /&gt;Make into a Needle plot via Y Options&lt;BR /&gt;Right Click in the plot and choose Line Width Scale &amp;gt; Other &amp;gt; 30 (say)&lt;BR /&gt;Turn off Show Points&lt;BR /&gt;&lt;BR /&gt;If you save the script to table or script window it will reproduce the same effect.</description>
      <pubDate>Tue, 16 Mar 2010 17:33:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Sum-totals-by-month-from-date-field/m-p/1356#M1356</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-16T17:33:48Z</dc:date>
    </item>
  </channel>
</rss>

