<?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: Turning Format Text to number in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4727784#M12576</link>
    <description>&lt;P&gt;Thanks for the feedback. I get the following error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mgaut341_0-1749592312753.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275420i7251134223CDCD1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mgaut341_0-1749592312753.png" alt="mgaut341_0-1749592312753.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jun 2025 21:51:59 GMT</pubDate>
    <dc:creator>mgaut341</dc:creator>
    <dc:date>2025-06-10T21:51:59Z</dc:date>
    <item>
      <title>Turning Format Text to number</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4725944#M12573</link>
      <description>&lt;P&gt;I have formatted text values, but I want to switch them to number values so I can apply a conditional format based on if the time is between 0-30 mintes or 31+ minutes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mgaut341_0-1749480416437.png" style="width: 588px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275012iE16A8C6A7F9F20FF/image-dimensions/588x25?v=v2" width="588" height="25" role="button" title="mgaut341_0-1749480416437.png" alt="mgaut341_0-1749480416437.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2025 14:47:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4725944#M12573</guid>
      <dc:creator>mgaut341</dc:creator>
      <dc:date>2025-06-09T14:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Turning Format Text to number</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4726258#M12574</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/629920"&gt;@mgaut341&lt;/a&gt;&lt;BR /&gt;You can get the number of minutes from the formated string using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;duration in minutes = INT(RIGHT(LEFT([Check in duration avg],5),2))​&lt;/LI-CODE&gt;&lt;DIV&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/bd-p/DAXCommands" target="_blank" rel="noopener"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grognard_0-1749501144614.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275093iED66826B0006E0F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="grognard_0-1749501144614.png" alt="grognard_0-1749501144614.png" /&gt;&lt;/span&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As an aside, this board is dedicated to developing custom visuals, and thus a little less active than the other boards. You might be able to get your question answered by posting to another forum such as&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/bd-p/DAXCommands" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/bd-p/DAXCommands.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Jun 2025 20:43:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4726258#M12574</guid>
      <dc:creator>grognard</dc:creator>
      <dc:date>2025-06-09T20:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Turning Format Text to number</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4727784#M12576</link>
      <description>&lt;P&gt;Thanks for the feedback. I get the following error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mgaut341_0-1749592312753.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1275420i7251134223CDCD1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mgaut341_0-1749592312753.png" alt="mgaut341_0-1749592312753.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2025 21:51:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4727784#M12576</guid>
      <dc:creator>mgaut341</dc:creator>
      <dc:date>2025-06-10T21:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Turning Format Text to number</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4728854#M12578</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Presumably&lt;/SPAN&gt;&lt;SPAN class=""&gt; some data is formatted lik&lt;/SPAN&gt;&lt;SPAN class=""&gt;e&lt;/SPAN&gt;&lt;SPAN class=""&gt; “00:4:21”&lt;/SPAN&gt;&lt;SPAN class=""&gt; or “4:31:12&lt;/SPAN&gt;&lt;SPAN class=""&gt;”.&lt;/SPAN&gt;&lt;SPAN class=""&gt; Since the code is expecting two numbers between each colon, &lt;/SPAN&gt;&lt;SPAN class=""&gt;it’s&lt;/SPAN&gt;&lt;SPAN class=""&gt; reading the minute number as “4:” which DAX &lt;/SPAN&gt;&lt;SPAN class=""&gt;can’t&lt;/SPAN&gt;&lt;SPAN class=""&gt; convert as a number. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;You can &lt;/SPAN&gt;&lt;SPAN class=""&gt;either &lt;/SPAN&gt;&lt;SPAN class=""&gt;address this in your data, &lt;/SPAN&gt;&lt;SPAN class=""&gt;which might be more difficult, or you could replace your calculation with this:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;duration in minutes = 
var textSize = LEN([Check in duration avg])
var l = SEARCH(":",[Check in duration avg])
var r = SEARCH(":",RIGHT([Check in duration avg],textSize - l))

return INT(LEFT(RIGHT([Check in duration avg],textSize - l),r - 1))&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;which should be a little more fault tolerant.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 14:39:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4728854#M12578</guid>
      <dc:creator>grognard</dc:creator>
      <dc:date>2025-06-11T14:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Turning Format Text to number</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4728879#M12579</link>
      <description>&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 14:52:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Turning-Format-Text-to-number/m-p/4728879#M12579</guid>
      <dc:creator>mgaut341</dc:creator>
      <dc:date>2025-06-11T14:52:57Z</dc:date>
    </item>
  </channel>
</rss>

