<?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: Summarizing time columns in the VA in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302703#M5536</link>
    <description>&lt;P&gt;Hey Bruno, thanks for your input. this is what i use to convert&amp;nbsp;sec into min and min into hr.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hourMinMsr=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN&gt;Sum [_ByGroup_] ('timeSec'n)&lt;/SPAN&gt; &amp;lt;=3600 return&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(( Sum [_ByGroup_] ('timeSec'n) / 60 )) + ( ( Sum [_ByGroup_] ('timeSec'n) Mod 60 ) / 100 )&lt;/P&gt;&lt;P&gt;else&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; (Floor(( Sum [_ByGroup_] ('timeSec'n) / 60 )) + ( ( Sum [_ByGroup_] ('timeSec'n) Mod 60 ) / 100 ))/60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above scenario would display both sec&amp;nbsp;in hours and min but user would have difficulty interpreting the data and&amp;nbsp;differentiating&amp;nbsp;between min and hours. To represent the data accurately, i think we can only use sec in min or sec in hour to accurately display the results. To combine sec in both min or hr will lead to more confusion. Let me know if you think otherwise or better solution. thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TimeCat &amp;nbsp; &amp;nbsp;timesecNum &amp;nbsp;MinMsr &amp;nbsp; hourMsr &amp;nbsp; hourMinMsr&lt;/P&gt;&lt;P&gt;0:06:04 &amp;nbsp; &amp;nbsp; 364 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.04 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.04&lt;/P&gt;&lt;P&gt;1.11.24 &amp;nbsp; &amp;nbsp; 4284 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;71.24 &amp;nbsp; &amp;nbsp; &amp;nbsp;1.19 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2016 15:41:52 GMT</pubDate>
    <dc:creator>Sac2001</dc:creator>
    <dc:date>2016-10-05T15:41:52Z</dc:date>
    <item>
      <title>Summarizing time columns in the VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302151#M5512</link>
      <description>&lt;P&gt;Time and date columns are treated as categories , hence summrization is not possible. The only solution is convert the time column into numeric and use them as measure and get summary total. but the total look useless because its all numeric values, i want to see total in hh:mm format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to change the format of time column to elapsed time and summarizing them in the bottom. The other reporting tool allows summarizing of time column, not sure why it's not supported in SAS . Is there a work around??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;eg&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;time&lt;/P&gt;&lt;P&gt;03:16&lt;/P&gt;&lt;P&gt;04:16&lt;/P&gt;&lt;P&gt;05:16&lt;/P&gt;&lt;P&gt;______&lt;/P&gt;&lt;P&gt;sum 12:48&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 19:20:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302151#M5512</guid>
      <dc:creator>Sac2001</dc:creator>
      <dc:date>2016-10-03T19:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing time columns in the VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302440#M5519</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;yes a time value is a category value and therefor you can not do any aggregations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest to do the follwoing:&lt;/P&gt;
&lt;P&gt;create a new calculated data item that represents the time as a numeric value using the TreatAs operator, something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;TreatAs(_Number_, 'Time'n)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you create a new aggreated measure using this expression:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Floor(( Sum [_ByGroup_] ('timeSec'n) / 60 )) + ( ( Sum [_ByGroup_] ('timeSec'n) Mod 60 ) / 100 )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where 'timeSec'n is the calculated item from the first step&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentialy you compute the minutes from you seconds and then use the Mod operator to add the remaining minutes (divided by 100) to the result. This will give you the proper result as mm.ss,, see also picture&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5147i22F17F48FDF48BB1/image-size/original?v=v2&amp;amp;px=-1" alt="Capture.PNG" title="Capture.PNG" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Give it a try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 18:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302440#M5519</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-10-04T18:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing time columns in the VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302474#M5525</link>
      <description>&lt;P&gt;Thanks Bruno,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see it produce results in mm:ss, is there way to include hh:mm:ss as well, i have seconds in hours as well. like timesec = 4284 and i want to convert into 1:11:24 and summarize in bottom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your input&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 21:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302474#M5525</guid>
      <dc:creator>Sac2001</dc:creator>
      <dc:date>2016-10-04T21:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing time columns in the VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302512#M5527</link>
      <description>&lt;P&gt;One could use the same technique for hours as well, but I guess the formatting of the result will be difficult, since there is no numeric format that with ":" as separator&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 05:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302512#M5527</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-10-05T05:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Summarizing time columns in the VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302703#M5536</link>
      <description>&lt;P&gt;Hey Bruno, thanks for your input. this is what i use to convert&amp;nbsp;sec into min and min into hr.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hourMinMsr=&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If &lt;SPAN&gt;Sum [_ByGroup_] ('timeSec'n)&lt;/SPAN&gt; &amp;lt;=3600 return&lt;/P&gt;&lt;P&gt;&amp;nbsp; Floor(( Sum [_ByGroup_] ('timeSec'n) / 60 )) + ( ( Sum [_ByGroup_] ('timeSec'n) Mod 60 ) / 100 )&lt;/P&gt;&lt;P&gt;else&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; (Floor(( Sum [_ByGroup_] ('timeSec'n) / 60 )) + ( ( Sum [_ByGroup_] ('timeSec'n) Mod 60 ) / 100 ))/60&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above scenario would display both sec&amp;nbsp;in hours and min but user would have difficulty interpreting the data and&amp;nbsp;differentiating&amp;nbsp;between min and hours. To represent the data accurately, i think we can only use sec in min or sec in hour to accurately display the results. To combine sec in both min or hr will lead to more confusion. Let me know if you think otherwise or better solution. thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TimeCat &amp;nbsp; &amp;nbsp;timesecNum &amp;nbsp;MinMsr &amp;nbsp; hourMsr &amp;nbsp; hourMinMsr&lt;/P&gt;&lt;P&gt;0:06:04 &amp;nbsp; &amp;nbsp; 364 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.04 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0.10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 6.04&lt;/P&gt;&lt;P&gt;1.11.24 &amp;nbsp; &amp;nbsp; 4284 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;71.24 &amp;nbsp; &amp;nbsp; &amp;nbsp;1.19 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1.19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 15:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Summarizing-time-columns-in-the-VA/m-p/302703#M5536</guid>
      <dc:creator>Sac2001</dc:creator>
      <dc:date>2016-10-05T15:41:52Z</dc:date>
    </item>
  </channel>
</rss>

