<?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: Duration format MIN:SEC in table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3315021#M124022</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;, spot on !&lt;/P&gt;&lt;P&gt;I'm not used to working with variables (VAR) in power bi. I'll get to it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jul 2023 20:28:40 GMT</pubDate>
    <dc:creator>Anth_NC_QN</dc:creator>
    <dc:date>2023-07-04T20:28:40Z</dc:date>
    <item>
      <title>Duration format MIN:SEC in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3313654#M123929</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;English is not my native language but i'll try to be as precise as possible. Sorry if i'm not clear. Please do ask me more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been trying to reproduce this excel table in power bi desktop :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;It's part of a shop performance evaluation based on a X month period. So in 2021 for eg, the average waiting time in minutes before being assisted is 2mn and 45sec which i converted from the decimal number 2,75 by dividing it by 24, and formatting the result.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In power bi, i've loaded only one table which contains the "waiting time" column in decimal numbers :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In order to display the results in a table, i've created this measure for the 2021 column i'm trying to reproduce :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;wait time = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;[waiting time]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;[Année]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"2021"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the table with the same data i used for the excel table screenshot :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The next step was to try formatting the results in MIN:SEC by completing the above dax formula using "FORMAT" :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;wait time = &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;AVERAGE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;[waiting time]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;[Année]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"2021"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#993366"&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;INT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;[waiting time]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;"00"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#993366"&gt;)&lt;/FONT&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;":"&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;FONT color="#993366"&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MOD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VM_DATA_QUANTI&lt;/SPAN&gt;&lt;SPAN&gt;[waiting time]&lt;/SPAN&gt;&lt;SPAN&gt; * &lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;60&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;"00"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using MOD in the second part of the FORMAT formula to find the remaining seconds once the minutes in whole numbers have been calculated.&lt;/P&gt;&lt;P&gt;As you can imagine, it didn't work lol.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you please have a solution on how i can display those decimal numbers in the same format as the excel screenshot ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 05:58:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3313654#M123929</guid>
      <dc:creator>Anth_NC_QN</dc:creator>
      <dc:date>2023-07-04T05:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format MIN:SEC in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3313679#M123930</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="584090" data-lia-user-login="Anth_NC_QN" class="lia-mention lia-mention-user"&gt;Anth_NC_QN&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;wait time =
VAR WaitTime =
    CALCULATE (
        AVERAGE ( VM_DATA_QUANTI[waiting time] ),
        FILTER ( VM_DATA_QUANTI, VM_DATA_QUANTI[Année] = "2021" )
    )
VAR TotalSeconds = WaitTime * 60
VAR Seconds =
    MOD ( TotalSeconds, 60 )
VAR Minutes =
    QUOTIENT ( TotalSeconds, 60 )
RETURN
    TIME ( 0, Minutes, Seconds )&lt;/LI-CODE&gt;
&lt;P&gt;You can then choose you preference of the time format type.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 06:22:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3313679#M123930</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-07-04T06:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Duration format MIN:SEC in table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3315021#M124022</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;, spot on !&lt;/P&gt;&lt;P&gt;I'm not used to working with variables (VAR) in power bi. I'll get to it.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Thank you&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 20:28:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-format-MIN-SEC-in-table/m-p/3315021#M124022</guid>
      <dc:creator>Anth_NC_QN</dc:creator>
      <dc:date>2023-07-04T20:28:40Z</dc:date>
    </item>
  </channel>
</rss>

