<?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 Displayed on Card in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142614#M17142</link>
    <description>&lt;P&gt;Welcome, kudos (thumps up are always welcome)&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jun 2020 17:53:59 GMT</pubDate>
    <dc:creator>stevedep</dc:creator>
    <dc:date>2020-06-04T17:53:59Z</dc:date>
    <item>
      <title>Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1139185#M17034</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with Google Analytics data and attempting to display a card with the Average Session Duration. I have created a custom column to display this data on my table in Power Query with the following formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= Table.AddColumn(#"Changed Type", "Average Session Duration", each [Session Duration] / [Sessions])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I know from viewing GA that the outcome I'm looking for is 0:01:17. From working with the data in Excel, I know that I can get the right answer with the following equation: Sum(Session Duration) / Sum(Sessions).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When I go to display this value on a card, it shows as a decimal.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I changed the Data Type to "Time" to get to the format but I can only Summarize the data with "Count" or "Don't Summarize", neither of which give me the average that I'm looking for.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;My calculation may be wrong but I can't tell based on the output that I'm getting. Any thoughts on how to get to the right number and display?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 13:54:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1139185#M17034</guid>
      <dc:creator>wcameron14</dc:creator>
      <dc:date>2020-06-04T13:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1141191#M17083</link>
      <description>&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 08:58:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1141191#M17083</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-04T08:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142037#M17115</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;I went back and added pictures to the post to make it a little easier to understand.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 13:57:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142037#M17115</guid>
      <dc:creator>wcameron14</dc:creator>
      <dc:date>2020-06-04T13:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142091#M17119</link>
      <description>&lt;P&gt;Thanks, that's helpful. How is the session duration stored in your dataset? Is it a duration in seconds or minutes (sum of)?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 14:17:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142091#M17119</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-04T14:17:38Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142100#M17121</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="199989" data-lia-user-login="wcameron14" class="lia-mention lia-mention-user"&gt;wcameron14&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try the following measure&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Display =&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var TSD = CALCULATE(Sum('Table'[Total Session Duration]),ALLSELECTED('Table'[Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var Sess = CALCULATE(Sum('Table'[Total Session]),ALLSELECTED('Table'[Date]))&lt;BR /&gt;&lt;BR /&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE (TSD,Sess)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Harsh Nathani&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Jun 2020 14:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142100#M17121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-04T14:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142228#M17127</link>
      <description>&lt;P&gt;It is stored as a duration in the dataset. D.hh:mm:ss.0 (See below).&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 15:11:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142228#M17127</guid>
      <dc:creator>wcameron14</dc:creator>
      <dc:date>2020-06-04T15:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142506#M17137</link>
      <description>&lt;P&gt;This still displays a decimal on the card. Maybe there's something I'm doing wrong with the formatting of my visual?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 16:38:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142506#M17137</guid>
      <dc:creator>wcameron14</dc:creator>
      <dc:date>2020-06-04T16:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142550#M17139</link>
      <description>&lt;P&gt;What you could do is create a calculated column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;averagepersessioncol = 'Table'[Total Session Duration]/'Table'[Sessions]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And a measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;durationpersession = Format(AVERAGE('Table'[averagepersessioncol]); "HH:MM:SS")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the 3rd and 4rth row this yields:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Which is the average of averages.. like here in excel:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to Power BI file &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgdgDd0kG7yIP9NI1cA?e=11ba4t" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;please mark as solution if this works for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:05:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142550#M17139</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-04T17:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142585#M17141</link>
      <description>&lt;P&gt;This helped with the formatting. My formula isn't quite right but I think I can figure it out from there. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:30:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142585#M17141</guid>
      <dc:creator>wcameron14</dc:creator>
      <dc:date>2020-06-04T17:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Duration Displayed on Card</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142614#M17142</link>
      <description>&lt;P&gt;Welcome, kudos (thumps up are always welcome)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jun 2020 17:53:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Duration-Displayed-on-Card/m-p/1142614#M17142</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-04T17:53:59Z</dc:date>
    </item>
  </channel>
</rss>

