<?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: calendar week? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766920#M94700</link>
    <description>&lt;P&gt;Ah I see now, I didn't follow your chart correctly.&amp;nbsp; Its isn't the first time in JMP that platforms don't align in their actions.&amp;nbsp; Probably the downside of a program being able to do so much, hard to keep everything aligned.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2024 23:54:44 GMT</pubDate>
    <dc:creator>shampton82</dc:creator>
    <dc:date>2024-06-18T23:54:44Z</dc:date>
    <item>
      <title>calendar week?</title>
      <link>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766782#M94677</link>
      <description>&lt;P&gt;&lt;STRONG&gt;year-week&lt;/STRONG&gt;&amp;nbsp;can be calculated in different ways.&lt;/P&gt;&lt;P&gt;a)&amp;nbsp; via the&amp;nbsp;right click context menu/&lt;STRONG&gt;new formula column&lt;/STRONG&gt; :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1718715994958.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65359iAA0EFC45DBCEF60B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1718715994958.png" alt="hogi_0-1718715994958.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) via &lt;STRONG&gt;Time Bins&lt;/STRONG&gt; in Graph Builder [via &lt;FONT face="courier new,courier"&gt;DateIncrement(date, 0)&lt;/FONT&gt;]&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_3-1718717865983.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65364i5995DFA4EA3884DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_3-1718717865983.png" alt="hogi_3-1718717865983.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This plots shows both values in the same graph.&lt;BR /&gt;On the top is: week by binning in Graph Builder, the bottom graph shows the week calculated via new formula column:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_4-1718718395932.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65365i9191524F70B14119/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_4-1718718395932.png" alt="hogi_4-1718718395932.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is "week" not defined consistently at both places ?!?&lt;/P&gt;&lt;P&gt;How can I make the weekly binning in Graph Builder start on a Monday ?!?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = New Table( "test",
	Add Rows( 30 ),
	Compress File When Saved( 1 ),
	New Column( "date",
		Format( "y/m/d", 12 ),
		Formula( Date DMY( 1, 1, 2024 )+ row()*24*60*60 )
	)
);
dt &amp;lt;&amp;lt; New Formula Column(
	Operation( Category( "Date Time" ), "Year Week" ),
	Columns( :date )
);

dt &amp;lt;&amp;lt; New Formula Column(
	Operation( Category( "Date Time" ), "Day of Week Name" ),
	Columns( :date )
);

wait(0);

dt &amp;lt;&amp;lt; Data Filter(
	Add Filter(	columns( :Day of Week ),Where( :Day of Week == "Sunday" )	)
);


dt &amp;lt;&amp;lt; Graph Builder(
	Transform Column(
		"Week[date]",
		Format( "Format Pattern", "&amp;lt;YYYY&amp;gt;&amp;lt;/&amp;gt;&amp;lt;MM&amp;gt;&amp;lt;/&amp;gt;&amp;lt;DD&amp;gt;", 15 ),
		Formula( Date Increment( :date, "Week", 0 ) )
	),
	Variables(
		X( :date ),
		Y( :"Week[date]"n ),
		Y( :Year Week ),
		Color( :Day of Week )
	),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 7 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 12 ) ) ),
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jun 2024 13:51:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766782#M94677</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-06-18T13:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: calendar week?</title>
      <link>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766868#M94689</link>
      <description>&lt;P&gt;I use these scripts to bin dates as either the Monday of the week or the Sunday of the week.&amp;nbsp; It would be nice if these were built in options for new formula columns.\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:08:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766868#M94689</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2024-06-18T18:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: calendar week?</title>
      <link>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766870#M94691</link>
      <description>&lt;P&gt;Actually, I am fine with what&amp;nbsp;&amp;nbsp;&lt;FONT face="courier new,courier"&gt;new formula column&lt;/FONT&gt;&amp;nbsp;generates - with Monday as first day of the week :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;My issue is the Date/Time Binning in Graph Builder.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Date Increment( :date, "Week", 0 )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;is a cool trick - but the developer of this functions seems to work in another country than me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 18:15:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766870#M94691</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-06-18T18:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: calendar week?</title>
      <link>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766920#M94700</link>
      <description>&lt;P&gt;Ah I see now, I didn't follow your chart correctly.&amp;nbsp; Its isn't the first time in JMP that platforms don't align in their actions.&amp;nbsp; Probably the downside of a program being able to do so much, hard to keep everything aligned.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2024 23:54:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/calendar-week/m-p/766920#M94700</guid>
      <dc:creator>shampton82</dc:creator>
      <dc:date>2024-06-18T23:54:44Z</dc:date>
    </item>
  </channel>
</rss>

