<?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 Regroup lines together according to Time range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3879060#M151432</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help regarding a way to combine lines together according to a time range.&lt;/P&gt;&lt;P&gt;I have got a facts table regrouping production stops/running time and also energy data in the same table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have got one Fabrication Order (FO) starting at 6:00 AM and finishing at 3:45 PM. Within this range I have got 2 breakdowns:&lt;/P&gt;&lt;P&gt;- Breakdown 1: from 6:00 AM to 7:AM = changeover time ( 1 hour )&lt;/P&gt;&lt;P&gt;- Breakdown 2: from 7:45 to 8:15 so 30 min&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I have got lot of lines every 10 mins with the energy consumption at this point (for example from 6:00 AM to 6:10 AM I have got 10 lines with the machine and the energy consumed).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you advise me what type of function can I use to split for example each breakdown and the running time into columns to know what kind of breakdon/running time it was?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today it is one line for each breakdown but I want to split this line into several lines but separated by 10 min and fit with the energy consumptions date/hour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if it is clear... The idea is to link the energy consumptions according to the line statement (running or stopped)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2024 14:35:33 GMT</pubDate>
    <dc:creator>Julbak</dc:creator>
    <dc:date>2024-04-30T14:35:33Z</dc:date>
    <item>
      <title>Regroup lines together according to Time range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3879060#M151432</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need help regarding a way to combine lines together according to a time range.&lt;/P&gt;&lt;P&gt;I have got a facts table regrouping production stops/running time and also energy data in the same table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have got one Fabrication Order (FO) starting at 6:00 AM and finishing at 3:45 PM. Within this range I have got 2 breakdowns:&lt;/P&gt;&lt;P&gt;- Breakdown 1: from 6:00 AM to 7:AM = changeover time ( 1 hour )&lt;/P&gt;&lt;P&gt;- Breakdown 2: from 7:45 to 8:15 so 30 min&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I have got lot of lines every 10 mins with the energy consumption at this point (for example from 6:00 AM to 6:10 AM I have got 10 lines with the machine and the energy consumed).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you advise me what type of function can I use to split for example each breakdown and the running time into columns to know what kind of breakdon/running time it was?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today it is one line for each breakdown but I want to split this line into several lines but separated by 10 min and fit with the energy consumptions date/hour.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if it is clear... The idea is to link the energy consumptions according to the line statement (running or stopped)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 14:35:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3879060#M151432</guid>
      <dc:creator>Julbak</dc:creator>
      <dc:date>2024-04-30T14:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Regroup lines together according to Time range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3881182#M151500</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="680367" data-lia-user-login="Julbak" class="lia-mention lia-mention-user"&gt;Julbak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you can use the split column function in Power Query with the merge columns function to implement your requirements. Here's the sample data I used:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;You need to make sure that each of your lines has a similar form.&amp;nbsp;Use the split column function as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Here are the results:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Next, use the function to merge columns:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Change the type of these two columns to time:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Finally, add a custom column, and the calculation logic is shown in the following figure:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The final result is as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I've provided the PBIX file used this time below.&lt;/P&gt;
&lt;P&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.powerbi.com%2Ft5%2FCommunity-Blog%2FHow-to-Get-Your-Question-Answered-Quickly%2Fba-p%2F38490&amp;amp;data=05%7C02%7Cv-jianpengli%40microsoft.com%7Cd9552f18a0c94a7564f308dc188bf35e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638412236574903368%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;amp;sdata=3jxUE%2BTNC8dS4DIhPphEB3NA%2BK94pwURGHu%2BXC4eezw%3D&amp;amp;reserved=0" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&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;Best Regards&lt;/P&gt;
&lt;P&gt;Jianpeng Li&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 03:37:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3881182#M151500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-01T03:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regroup lines together according to Time range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3886569#M151615</link>
      <description>&lt;P&gt;Hello Thanks for the answer, I will look at it but at least I have got something as a base to work on. Thank you again&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 15:26:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Regroup-lines-together-according-to-Time-range/m-p/3886569#M151615</guid>
      <dc:creator>Julbak</dc:creator>
      <dc:date>2024-05-02T15:26:30Z</dc:date>
    </item>
  </channel>
</rss>

