<?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 Break Duration Down Across Multiple Months in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3207796#M116904</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a potentially complex problem I was hoping to get some help or guidance with. I have some data that looks similar to this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Start Time&lt;/TD&gt;&lt;TD&gt;End Time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/31/2023 11:40pm&lt;/TD&gt;&lt;TD&gt;4/1/2023 12:40am&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/31/2023 11:40pm&lt;/TD&gt;&lt;TD&gt;3/31/2023 11:45pm&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4/4/2023 12:40am&lt;/TD&gt;&lt;TD&gt;4/4/2023 1:00am&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023 12:40am&lt;/TD&gt;&lt;TD&gt;4/4/2023 12:40am&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to be able to calculate the duration of time between Start Time and End Time, however I need to break down this duration across multiple months. I can easily find total duration time by simply creating a calculated column&amp;nbsp;and using DATEDIFF with MINUTES&amp;nbsp;interval, however I need to be able to break down this duration total down by month in my report visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for the very last row in my example: I need to be able to chart [x] amount of mins in February, [x] amount of mins in March, and [x] amount of mins in April.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this even possible with DAX? Any advise would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 18:16:02 GMT</pubDate>
    <dc:creator>jakoob</dc:creator>
    <dc:date>2023-04-26T18:16:02Z</dc:date>
    <item>
      <title>Break Duration Down Across Multiple Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3207796#M116904</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a potentially complex problem I was hoping to get some help or guidance with. I have some data that looks similar to this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Start Time&lt;/TD&gt;&lt;TD&gt;End Time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/31/2023 11:40pm&lt;/TD&gt;&lt;TD&gt;4/1/2023 12:40am&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3/31/2023 11:40pm&lt;/TD&gt;&lt;TD&gt;3/31/2023 11:45pm&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4/4/2023 12:40am&lt;/TD&gt;&lt;TD&gt;4/4/2023 1:00am&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2/4/2023 12:40am&lt;/TD&gt;&lt;TD&gt;4/4/2023 12:40am&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to be able to calculate the duration of time between Start Time and End Time, however I need to break down this duration across multiple months. I can easily find total duration time by simply creating a calculated column&amp;nbsp;and using DATEDIFF with MINUTES&amp;nbsp;interval, however I need to be able to break down this duration total down by month in my report visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, for the very last row in my example: I need to be able to chart [x] amount of mins in February, [x] amount of mins in March, and [x] amount of mins in April.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this even possible with DAX? Any advise would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 18:16:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3207796#M116904</guid>
      <dc:creator>jakoob</dc:creator>
      <dc:date>2023-04-26T18:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: Break Duration Down Across Multiple Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3210409#M117075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="515534" data-lia-user-login="jakoob" class="lia-mention lia-mention-user"&gt;jakoob&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;"&lt;SPAN&gt;I need to be able to chart [x] amount of mins in February, [x] amount of mins in March, and [x] amount of mins in April."&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What is the last row output?Like the following?&lt;/SPAN&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;start time&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;end time&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;2&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;3&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;4&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="20%" height="30px"&gt;&lt;SPAN&gt;2/4/2023 12:40am&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;&lt;SPAN&gt;4/4/2023 12:40am&lt;/SPAN&gt;&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;hours&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;hours&lt;/TD&gt;
&lt;TD width="20%" height="30px"&gt;hours&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What form does the whole table take?&lt;/P&gt;
&lt;P&gt;As far as I know there is no directly implementable dax, it can be implemented in PQ, but it includes time and seems to be more complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&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;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 02:47:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3210409#M117075</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-04-28T02:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Break Duration Down Across Multiple Months</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3216382#M117444</link>
      <description>&lt;P&gt;Sorry, maybe my explanation&amp;nbsp;was not clear enough:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets use the row you provided in your reply&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;start time&lt;/TD&gt;&lt;TD&gt;end time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;2/4/2023 12:40am&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;4/4/2023 12:40am&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The total difference in time between the start time and end time above is 84,958&amp;nbsp;&lt;SPAN&gt;minutes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However this is not what I need.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Of the&amp;nbsp;84,960 total minutes between the two dates above, I need to break down the mins by each month. This particular event occurred&amp;nbsp;during the months of February, March, and April. During each of those months, this is how many mins this event spanned across those 3 months.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;February: 35,959 mins&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;March: 44,639 mins&lt;BR /&gt;April: 4,360 mins&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Total Time:&amp;nbsp;84,958 mins&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to be able to graph&amp;nbsp;this in a visual&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 19:13:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Break-Duration-Down-Across-Multiple-Months/m-p/3216382#M117444</guid>
      <dc:creator>jakoob</dc:creator>
      <dc:date>2023-05-02T19:13:03Z</dc:date>
    </item>
  </channel>
</rss>

