<?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 Duration to Seconds Converter in Quick Measures Gallery</title>
    <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92</link>
    <description>&lt;P&gt;Converts a Text duration in the format HH:MM:SS to seconds. The measure takes a single input column ([Duration]).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duration2Seconds =&lt;/P&gt;
&lt;P&gt;VAR sub = SUBSTITUTE(MAX('Table'[Duration]),":","|")&lt;BR /&gt;VAR hours = VALUE(PATHITEM(sub,1))*3600&lt;BR /&gt;VAR minutes = VALUE(PATHITEM(sub,2))*60&lt;BR /&gt;VAR seconds = VALUE(PATHITEM(sub,3))*1&lt;BR /&gt;RETURN hours+minutes+seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the appropriate wizard interface and abstraction, this technique could handle any number of levels and a variety of data input formats, as long as those formats are segmented by a common delimiter ([Delimiter]). The interface could parse the string and present an interface for entering the correct conversion factor ([CF#]) for each level. Pseudo-code follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Conversion =&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR sub = SUBSTITUTE(MAX('Table'[Column]),"[Delimiter]","|")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR level1 =&amp;nbsp;&lt;SPAN&gt;VALUE(PATHITEM(sub,1))*[CF1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR level2 = VALUE(PATHITEM(sub,2))*[CF2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&amp;nbsp;level3 = VALUE(PATHITEM(sub,3))*[CF3]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;VAR level# = VALUE(PATHITEM(sub,#))*[CF#]&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&amp;nbsp;level1+level2+level3+...+level#&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiZDg1YThlNWItYWI3MC00ZjA2LTk1YTItOTM4NzgxOGYxMmJkIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jun 2018 20:46:37 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2018-06-27T20:46:37Z</dc:date>
    <item>
      <title>Duration to Seconds Converter</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92</link>
      <description>&lt;P&gt;Converts a Text duration in the format HH:MM:SS to seconds. The measure takes a single input column ([Duration]).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duration2Seconds =&lt;/P&gt;
&lt;P&gt;VAR sub = SUBSTITUTE(MAX('Table'[Duration]),":","|")&lt;BR /&gt;VAR hours = VALUE(PATHITEM(sub,1))*3600&lt;BR /&gt;VAR minutes = VALUE(PATHITEM(sub,2))*60&lt;BR /&gt;VAR seconds = VALUE(PATHITEM(sub,3))*1&lt;BR /&gt;RETURN hours+minutes+seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With the appropriate wizard interface and abstraction, this technique could handle any number of levels and a variety of data input formats, as long as those formats are segmented by a common delimiter ([Delimiter]). The interface could parse the string and present an interface for entering the correct conversion factor ([CF#]) for each level. Pseudo-code follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Conversion =&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR sub = SUBSTITUTE(MAX('Table'[Column]),"[Delimiter]","|")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;VAR level1 =&amp;nbsp;&lt;SPAN&gt;VALUE(PATHITEM(sub,1))*[CF1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR level2 = VALUE(PATHITEM(sub,2))*[CF2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR&amp;nbsp;level3 = VALUE(PATHITEM(sub,3))*[CF3]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;VAR level# = VALUE(PATHITEM(sub,#))*[CF#]&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&amp;nbsp;level1+level2+level3+...+level#&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="reportid hidden"&gt;eyJrIjoiZDg1YThlNWItYWI3MC00ZjA2LTk1YTItOTM4NzgxOGYxMmJkIiwidCI6IjRhMDQyNzQzLTM3M2EtNDNkMi04MjdiLTAwM2Y0YzdiYTFlNSIsImMiOjN9&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 20:46:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2018-06-27T20:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Duration to Seconds Converter</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/2477670#M839</link>
      <description>&lt;P&gt;I am Having DD HH:MM:SS , could you help me in figuring it&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 11:58:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/2477670#M839</guid>
      <dc:creator>svaranas</dc:creator>
      <dc:date>2022-04-26T11:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Duration to Seconds Converter</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/2477928#M841</link>
      <description>&lt;P&gt;I did some Study it seems i was able to Substitute the space with ":", however, 00:00:14:26 = 14 mins roughly, the problem is for level 1 it is using from 14 not using 00&lt;/P&gt;</description>
      <pubDate>Tue, 26 Apr 2022 13:29:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/2477928#M841</guid>
      <dc:creator>svaranas</dc:creator>
      <dc:date>2022-04-26T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Duration to Seconds Converter</title>
      <link>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/2948754#M932</link>
      <description>&lt;P&gt;Hi I tried this method it didn't work for me. Says variabl 'minutes' cannot be created because a table or variable with the same name already exist&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 14:49:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/2948754#M932</guid>
      <dc:creator>Stan914</dc:creator>
      <dc:date>2022-12-05T14:49:49Z</dc:date>
    </item>
  </channel>
</rss>

