<?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: Combining Hours and Minutes then Averaging in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484735#M133316</link>
    <description>&lt;P&gt;To find the average time spent on surveys in Power BI when the hours and minutes are in different columns, you can follow these steps:&lt;/P&gt;&lt;P&gt;Assuming you have two columns named "Hours" and "Minutes" to represent the time spent on surveys, you can combine them into a single column and then calculate the average. Here's how you can do it:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Combine Hours and Minutes into a Single Column:&lt;/STRONG&gt; You can create a custom column that combines the hours and minutes into a single time duration column. You can use the Power Query Editor to do this. Follow these steps:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open Power BI Desktop.&lt;/LI&gt;&lt;LI&gt;Go to "Home" &amp;gt; "Edit Queries" to open the Power Query Editor.&lt;/LI&gt;&lt;LI&gt;Select the table containing your survey data.&lt;/LI&gt;&lt;LI&gt;Go to the "Add Column" tab and select "Custom Column."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In the "Custom Column" dialog, use a formula like this to combine hours and minutes:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Duration.From([Hours] &amp;amp; ":" &amp;amp; [Minutes])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;This will create a new column that combines the hours and minutes into a time duration.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Calculate the Average Time:&lt;/STRONG&gt; After you've combined the hours and minutes into a single column, you can now calculate the average time spent. Here's how:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Close the Power Query Editor, and you'll see the new combined column in your data table.&lt;/LI&gt;&lt;LI&gt;Create a new measure to calculate the average duration. Go to the "Modeling" tab and select "New Measure."&lt;/LI&gt;&lt;LI&gt;In the formula bar for the new measure, use the AVERAGE function to calculate the average duration:&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Average Duration = AVERAGE('YourTableName'[CombinedTimeColumn])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Replace 'YourTableName' with the name of your data table and 'CombinedTimeColumn' with the name of the column where you combined hours and minutes.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now you have a measure called "Average Duration" that gives you the average time spent on surveys. You can add this measure to your visuals and reports to display the average time.&lt;/P&gt;&lt;P&gt;Make sure that the "CombinedTimeColumn" in your model is set as a duration data type so that the AVERAGE function can calculate the average correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2023 06:12:41 GMT</pubDate>
    <dc:creator>123abc</dc:creator>
    <dc:date>2023-10-19T06:12:41Z</dc:date>
    <item>
      <title>Combining Hours and Minutes then Averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484374#M133298</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find the average of time spent when doing surveys.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The hours and minutes spent are in different columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cant seem to find how to combine the times together then find the average time spent umong the surveys.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 01:20:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484374#M133298</guid>
      <dc:creator>TBSST</dc:creator>
      <dc:date>2023-10-19T01:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Hours and Minutes then Averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484731#M133315</link>
      <description>&lt;P&gt;Is there any chance that you can create a column and do all your calculations in minutes?&amp;nbsp;&lt;BR /&gt;When you get the result that you want (in minutes), you can then adapt one of these to format as hh:mm:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Quick-Measures-Gallery/Duration-to-Seconds-Converter/m-p/342279#M92&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 06:10:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484731#M133315</guid>
      <dc:creator>vicky_</dc:creator>
      <dc:date>2023-10-19T06:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Hours and Minutes then Averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484735#M133316</link>
      <description>&lt;P&gt;To find the average time spent on surveys in Power BI when the hours and minutes are in different columns, you can follow these steps:&lt;/P&gt;&lt;P&gt;Assuming you have two columns named "Hours" and "Minutes" to represent the time spent on surveys, you can combine them into a single column and then calculate the average. Here's how you can do it:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Combine Hours and Minutes into a Single Column:&lt;/STRONG&gt; You can create a custom column that combines the hours and minutes into a single time duration column. You can use the Power Query Editor to do this. Follow these steps:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open Power BI Desktop.&lt;/LI&gt;&lt;LI&gt;Go to "Home" &amp;gt; "Edit Queries" to open the Power Query Editor.&lt;/LI&gt;&lt;LI&gt;Select the table containing your survey data.&lt;/LI&gt;&lt;LI&gt;Go to the "Add Column" tab and select "Custom Column."&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In the "Custom Column" dialog, use a formula like this to combine hours and minutes:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Duration.From([Hours] &amp;amp; ":" &amp;amp; [Minutes])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;This will create a new column that combines the hours and minutes into a time duration.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Calculate the Average Time:&lt;/STRONG&gt; After you've combined the hours and minutes into a single column, you can now calculate the average time spent. Here's how:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Close the Power Query Editor, and you'll see the new combined column in your data table.&lt;/LI&gt;&lt;LI&gt;Create a new measure to calculate the average duration. Go to the "Modeling" tab and select "New Measure."&lt;/LI&gt;&lt;LI&gt;In the formula bar for the new measure, use the AVERAGE function to calculate the average duration:&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Average Duration = AVERAGE('YourTableName'[CombinedTimeColumn])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;Replace 'YourTableName' with the name of your data table and 'CombinedTimeColumn' with the name of the column where you combined hours and minutes.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Now you have a measure called "Average Duration" that gives you the average time spent on surveys. You can add this measure to your visuals and reports to display the average time.&lt;/P&gt;&lt;P&gt;Make sure that the "CombinedTimeColumn" in your model is set as a duration data type so that the AVERAGE function can calculate the average correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;SPAN&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 06:12:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3484735#M133316</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-10-19T06:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Combining Hours and Minutes then Averaging</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3487059#M133435</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="580281" data-lia-user-login="TBSST" class="lia-mention lia-mention-user"&gt;TBSST&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I created the simple sample, you may check 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;An attachment for your reference. Hope it helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Community Support Team_ Scott Chang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider &lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 07:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Combining-Hours-and-Minutes-then-Averaging/m-p/3487059#M133435</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-20T07:04:18Z</dc:date>
    </item>
  </channel>
</rss>

