<?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: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2060089#M46468</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321556" data-lia-user-login="Nelvbautista" class="lia-mention lia-mention-user"&gt;Nelvbautista&lt;/a&gt;&amp;nbsp;I made an improved version here:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Text-Duration-Conversion/td-p/2036198" target="_blank"&gt;Text Duration Conversion - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in the comments, note that there is an alternate (better) way to do the text 2 table bit.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 15:27:12 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2021-09-06T15:27:12Z</dc:date>
    <item>
      <title>How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2032830#M45594</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help with converting duration values in text&amp;nbsp;(xx day XX hour XX minutes) to decimals (hhhh.mm) using DAX.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate any help guys...&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 17:19:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2032830#M45594</guid>
      <dc:creator>Nelvbautista</dc:creator>
      <dc:date>2021-08-23T17:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033069#M45600</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321556" data-lia-user-login="Nelvbautista" class="lia-mention lia-mention-user"&gt;Nelvbautista&lt;/a&gt; , Try a new column like &lt;/P&gt;
&lt;P&gt;Number.FromText (Text.Combine(List.RemoveItems(Text.Split([ticket duration], " "), {"hour", "minutes", "day"} ),"."))&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 17:48:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033069#M45600</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-08-23T17:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033140#M45602</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321556" data-lia-user-login="Nelvbautista" class="lia-mention lia-mention-user"&gt;Nelvbautista&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Follow below steps it will work :-&lt;BR /&gt;Step 1 : Go to the Power Query Editor --&amp;gt; Click on the Duration Column and apply some transformation like "lowercase" and "trim"&lt;BR /&gt;Step 2 : To extract the day from column go to the Add Column --&amp;gt; Extract --&amp;gt; Click on text before delimeter --&amp;gt; text before delimeter popup will open&lt;BR /&gt;--&amp;gt; Specify Delimeter as "day" and in the advanced option --&amp;gt; select "From the end of the input" from Scan for delimter dropdown.&lt;BR /&gt;It will create new column rename it with Day.&lt;BR /&gt;Step 3: Add Column --&amp;gt; Extract --&amp;gt; now select for "Text between delimeter"&lt;BR /&gt;It will open the popup for Text between delimeter --&amp;gt; Spcify Start delimter as press space button and then type hour&lt;BR /&gt;--&amp;gt; Spcify End delimter as press space button&lt;BR /&gt;--&amp;gt; In the Advanced option select "From the end of the input" from Scan for start delimeter dropdown.&lt;BR /&gt;--&amp;gt; select "From the start delimeter, toward the start of the input"&lt;BR /&gt;--&amp;gt; Click OK.&lt;BR /&gt;Step 4: Follow the 3rd step for minutes and seconds&lt;BR /&gt;Step 5:Rename all the column as Day, Hour, Minutes, seconds respectively.&lt;BR /&gt;Step 6: Copy all four columns Goto the Tranform--&amp;gt;Replace values --&amp;gt; Values to Find--&amp;gt; leave it blank --&amp;gt;Specify "Replace with" as 0--&amp;gt; Click OK.&lt;BR /&gt;Step 7 : Copy all fourcolumns Again Goto the transform --&amp;gt; Merge Column --&amp;gt;Seperator: colon--&amp;gt;Specify column Name--&amp;gt;Click OK&lt;BR /&gt;Step 8: Right click on the column and change the data type as "Duration"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 18:11:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033140#M45602</guid>
      <dc:creator>community_pinki</dc:creator>
      <dc:date>2021-08-23T18:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033204#M45607</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="280367" data-lia-user-login="community_pinki" class="lia-mention lia-mention-user"&gt;community_pinki&lt;/a&gt;&amp;nbsp;appreciate the assistance and time in looking into this, but would there be an option to have this as a formula because this will be a growing dataset wherein new rows will be continously added?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 19:20:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033204#M45607</guid>
      <dc:creator>Nelvbautista</dc:creator>
      <dc:date>2021-08-23T19:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033321#M45612</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321556" data-lia-user-login="Nelvbautista" class="lia-mention lia-mention-user"&gt;Nelvbautista&lt;/a&gt;&amp;nbsp;If you truly want a DAX solution, try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
    VAR __Duration = [Ticket Duration]
    VAR __DayLocation = SEARCH("day",__Duration,,0)
    VAR __HourLocation = SEARCH("hour",__Duration,,0)
    VAR __MinuteLocation = SEARCH("minute",__Duration,,0)
    VAR __Days = IF(__DayLocation,VALUE(LEFT(__Duration,__DayLocation - 1)),0)
    VAR __DaySeparator = IF(__DayLocation&amp;lt;&amp;gt;0,SEARCH(" ",__Duration,__DayLocation,0),1)
    VAR __HourSeparator = 
        SWITCH(TRUE(),
            __DayLocation&amp;lt;&amp;gt;0,SEARCH(" ",__Duration,__DaySeparator+1,1),
            __HourLocation=0,1,
            SEARCH(" ",__Duration)
        )
    VAR __Hours = IF(__HourLocation=0,0,VALUE(MID(__Duration,__DaySeparator,__HourSeparator - __DaySeparator + 1)))
    VAR __MinuteSeparator = IF(__HourSeparator=1,1,SEARCH(" ",__Duration,__HourSeparator+1,0))
    VAR __LastSeparator = SEARCH(" ",__Duration,__MinuteSeparator+1,0)
    VAR __Minutes = VALUE(MID(__Duration,__MinuteSeparator,__LastSeparator - __MinuteSeparator + 1))
RETURN
    __Days * 24 + __Hours + __Minutes/100&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 23 Aug 2021 20:58:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033321#M45612</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-23T20:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033377#M45616</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;appreciate the help, the formula works, thank you very much.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 21:24:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033377#M45616</guid>
      <dc:creator>Nelvbautista</dc:creator>
      <dc:date>2021-08-23T21:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033624#M45624</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321556" data-lia-user-login="Nelvbautista" class="lia-mention lia-mention-user"&gt;Nelvbautista&lt;/a&gt;&amp;nbsp;Glad to hear it because that one took a bit of time! You could likely convert that formula to Power Query if you were so inclined using the function equivalents for SEARCH, LEFT, MID, etc. in Power Query.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Aug 2021 02:04:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2033624#M45624</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-24T02:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2059956#M46462</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;appreciate your help on this a couple of weeks back. I'm now getting an error, &lt;FONT color="#FF0000"&gt;"An argument of function 'MID' has the wrong data type or has an invalid value"&lt;/FONT&gt; when I expended the table to include historical data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the updated duration column (blanks are 0 duration). Appreciate any help you can provide:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 13:55:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2059956#M46462</guid>
      <dc:creator>Nelvbautista</dc:creator>
      <dc:date>2021-09-06T13:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2060089#M46468</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321556" data-lia-user-login="Nelvbautista" class="lia-mention lia-mention-user"&gt;Nelvbautista&lt;/a&gt;&amp;nbsp;I made an improved version here:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Text-Duration-Conversion/td-p/2036198" target="_blank"&gt;Text Duration Conversion - Microsoft Power BI Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, in the comments, note that there is an alternate (better) way to do the text 2 table bit.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 15:27:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2060089#M46468</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-09-06T15:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: How To Convert Text Duration (xx day XX hour XX minutes) to Decimal</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2060243#M46477</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;As expected, really appreciate the speedy response.&amp;nbsp;I tried (copy-pasting) the updated formula and only returned 900 on all rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was also prompetd to update to the latest Power BI Desktop version when trying to open your pbix attachment. My current version is "2.93.981.0 64-bit (May 2021)".&amp;nbsp; I might need to wait for our IT for this update first. Again, appreciate the help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nel&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 16:40:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-To-Convert-Text-Duration-xx-day-XX-hour-XX-minutes-to/m-p/2060243#M46477</guid>
      <dc:creator>Nelvbautista</dc:creator>
      <dc:date>2021-09-06T16:40:12Z</dc:date>
    </item>
  </channel>
</rss>

