<?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: Grouping option in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215248#M52411</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is one way, assume it sorts by Start datetime, not elegant...but does the job&lt;/P&gt;
&lt;P&gt;use dummy data&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fc87DoAgEEXRrRhqEubDFLoVQmFFqTFx/1IZ4cWpyMm7xVBK2EMM7bhP7i8nTkLCy7qRgWv8rZnA31qm1cBvffVcx1kI7OYG9nIlsPNRNbBTZwIPp+RpNnCtDw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Task = _t, Group = _t, Start = _t, End = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Task", type text}, {"Group", type text}, {"Start", type datetime}, {"End", type datetime}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
    #"Added Custom" = Table.AddColumn(#"Added Index", "minStart", each if [Index]=0 then 1 
else if [Group]=#"Added Index"[Group]{[Index]-1} then 0
else 1),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "maxEnd", each try if [Group]=#"Added Index"[Group]{[Index]+1} then 0
else 1 otherwise 1),
    StartTable = Table.AddIndexColumn( Table.SelectColumns( Table.SelectRows(#"Added Custom1", each ([minStart] = 1)),{"Group", "Start"}),"Index", 0, 1, Int64.Type),
    EndTable = Table.AddIndexColumn( Table.SelectColumns( Table.SelectRows(#"Added Custom1", each ([maxEnd] = 1)),{"Group", "End"}),"Index", 0, 1, Int64.Type),
    #"Merged Queries" = Table.NestedJoin(StartTable, {"Group", "Index"}, EndTable, {"Group", "Index"}, "EndTable", JoinKind.LeftOuter),
    #"Expanded EndTable" = Table.ExpandTableColumn(#"Merged Queries", "EndTable", {"End"}, {"End"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded EndTable",{"Index"})
in
    #"Removed Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Dec 2021 03:13:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-12-01T03:13:57Z</dc:date>
    <item>
      <title>Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2213836#M52313</link>
      <description>&lt;P&gt;Hi Team, need help.&lt;/P&gt;&lt;P&gt;I am looking for the solution , where it can group based on the assignment group , start and end. I have attached the snap shot of my problem and what I am looking as a solution. Please let me know if any one from this group can help with simple solution. Many thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 10:59:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2213836#M52313</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-11-30T10:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2214382#M52353</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp; can you please provide the data in atable format here ?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 15:53:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2214382#M52353</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-11-30T15:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215248#M52411</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is one way, assume it sorts by Start datetime, not elegant...but does the job&lt;/P&gt;
&lt;P&gt;use dummy data&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fc87DoAgEEXRrRhqEubDFLoVQmFFqTFx/1IZ4cWpyMm7xVBK2EMM7bhP7i8nTkLCy7qRgWv8rZnA31qm1cBvffVcx1kI7OYG9nIlsPNRNbBTZwIPp+RpNnCtDw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Task = _t, Group = _t, Start = _t, End = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Task", type text}, {"Group", type text}, {"Start", type datetime}, {"End", type datetime}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type),
    #"Added Custom" = Table.AddColumn(#"Added Index", "minStart", each if [Index]=0 then 1 
else if [Group]=#"Added Index"[Group]{[Index]-1} then 0
else 1),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "maxEnd", each try if [Group]=#"Added Index"[Group]{[Index]+1} then 0
else 1 otherwise 1),
    StartTable = Table.AddIndexColumn( Table.SelectColumns( Table.SelectRows(#"Added Custom1", each ([minStart] = 1)),{"Group", "Start"}),"Index", 0, 1, Int64.Type),
    EndTable = Table.AddIndexColumn( Table.SelectColumns( Table.SelectRows(#"Added Custom1", each ([maxEnd] = 1)),{"Group", "End"}),"Index", 0, 1, Int64.Type),
    #"Merged Queries" = Table.NestedJoin(StartTable, {"Group", "Index"}, EndTable, {"Group", "Index"}, "EndTable", JoinKind.LeftOuter),
    #"Expanded EndTable" = Table.ExpandTableColumn(#"Merged Queries", "EndTable", {"End"}, {"End"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded EndTable",{"Index"})
in
    #"Removed Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 03:13:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215248#M52411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T03:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215422#M52420</link>
      <description>&lt;P&gt;hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&amp;nbsp;you are awesome.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me with one more thing, it is possible to include Task also in that table.&lt;/P&gt;&lt;P&gt;I understand it is done through index.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; I am still in process of learning path, can you kindly include Task along with Group, start and end. This will really help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 05:49:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215422#M52420</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T05:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215453#M52423</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&amp;nbsp; Many thanks for reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I observed one thing,&amp;nbsp;&lt;/P&gt;&lt;P&gt;End of first row should be start of the second row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 06:19:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215453#M52423</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T06:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215511#M52425</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good catch, so the datetime is continuous. Can you provide some sample data in a format which people can copy? No need to have lots of rows, but please include at least 2 Task, I will see how to work from there&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 06:56:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215511#M52425</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T06:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215539#M52427</link>
      <description>&lt;P&gt;Hey&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;, I dint realise i can paste the table. See if this works. Thanks.&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Input&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task&lt;/TD&gt;&lt;TD&gt;Assignment group&lt;/TD&gt;&lt;TD&gt;Start&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup1&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:21:20&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:21:51&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup2&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:21:51&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:40:55&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup2&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:40:55&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:49:29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup1&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:49:29&lt;/TD&gt;&lt;TD&gt;16-07-2021 11:31:28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup1&lt;/TD&gt;&lt;TD&gt;16-07-2021 11:31:28&lt;/TD&gt;&lt;TD&gt;21-07-2021 09:51:03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;21-07-2021 09:51:03&lt;/TD&gt;&lt;TD&gt;21-07-2021 10:02:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;21-07-2021 10:02:00&lt;/TD&gt;&lt;TD&gt;21-07-2021 10:05:46&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;21-07-2021 10:05:46&lt;/TD&gt;&lt;TD&gt;21-07-2021 11:19:14&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;21-07-2021 11:19:14&lt;/TD&gt;&lt;TD&gt;22-07-2021 09:14:20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup4&lt;/TD&gt;&lt;TD&gt;22-07-2021 09:14:20&lt;/TD&gt;&lt;TD&gt;23-07-2021 12:27:34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;23-07-2021 12:27:34&lt;/TD&gt;&lt;TD&gt;23-07-2021 13:38:41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup5&lt;/TD&gt;&lt;TD&gt;23-07-2021 13:38:41&lt;/TD&gt;&lt;TD&gt;23-07-2021 17:56:29&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Output&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Task&lt;/TD&gt;&lt;TD&gt;Assignment group&lt;/TD&gt;&lt;TD&gt;Start&lt;/TD&gt;&lt;TD&gt;End&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup1&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:21:20&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:21:51&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup2&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:21:51&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:49:29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup1&lt;/TD&gt;&lt;TD&gt;16-07-2021 07:49:29&lt;/TD&gt;&lt;TD&gt;21-07-2021 09:51:03&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;21-07-2021 09:51:03&lt;/TD&gt;&lt;TD&gt;22-07-2021 09:14:20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup4&lt;/TD&gt;&lt;TD&gt;22-07-2021 09:14:20&lt;/TD&gt;&lt;TD&gt;23-07-2021 12:27:34&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup3&lt;/TD&gt;&lt;TD&gt;23-07-2021 12:27:34&lt;/TD&gt;&lt;TD&gt;23-07-2021 13:38:41&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Ticket#12345&lt;/TD&gt;&lt;TD&gt;Assignmentgroup5&lt;/TD&gt;&lt;TD&gt;23-07-2021 13:38:41&lt;/TD&gt;&lt;TD&gt;23-07-2021 17:56:29&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 07:19:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215539#M52427</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T07:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215621#M52436</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:01:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215621#M52436</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-12-01T08:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215657#M52442</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try the way from&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264353" data-lia-user-login="wdx223_Daniel" class="lia-mention lia-mention-user"&gt;wdx223_Daniel&lt;/a&gt;, more elegant&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:20:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215657#M52442</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T08:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215658#M52443</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264353" data-lia-user-login="wdx223_Daniel" class="lia-mention lia-mention-user"&gt;wdx223_Daniel&lt;/a&gt;&amp;nbsp;, Thanks for reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not able to replace the source, which I get from Azure SQL DB.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:21:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215658#M52443</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T08:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215670#M52445</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264353" data-lia-user-login="wdx223_Daniel" class="lia-mention lia-mention-user"&gt;wdx223_Daniel&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know where i made mistake.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;= #table(Sql.Database("*****.database.windows.net,1433", "DB name", [Query="select * from [dbo].[tablename] where Task in ('Ticket1','Ticket2');"]),List.Accumulate(Table.ToRows(Source),{},(x,y)=&amp;gt;if x={} them {y} else let a = List.Last(x) in if a{0}=y{0} and a{1}=y{1} and a{3} = y{2} them List.RemoveLastN(x,1)&amp;amp;{List.RemoveLastN(a,1)&amp;amp;{y{3}}} else x&amp;amp;{y}))&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:28:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215670#M52445</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T08:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215694#M52447</link>
      <description>&lt;P&gt;there is no need to change your source code. just insert my code after the step which output your sample data table. and replace "Source" with the name of previous step name.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:38:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215694#M52447</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2021-12-01T08:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215700#M52448</link>
      <description>&lt;P&gt;It is possible to paste the "advance editor" code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 08:42:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2215700#M52448</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T08:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216062#M52461</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="264353" data-lia-user-login="wdx223_Daniel" class="lia-mention lia-mention-user"&gt;wdx223_Daniel&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the advance editor, I have below information :&amp;nbsp; and I get error message :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expression.Error: The import Changed Type matches no exports. Did you miss a module&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expression.Error: The name #"Changed Type" wasn't recognized. Make sure it's spelled correctly. reference?&lt;/P&gt;&lt;P&gt;===========================&lt;BR /&gt;let&lt;BR /&gt;Source = Sql.Database("***.database.windows.net,1433", "DB Name", [Query="select * from [dbo].[Table Name] where Task in ('Ticket 1','Ticket 2');"]),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(Source,{{"Start", type datetime}})&lt;BR /&gt;=#table(Table.ColumnNames(#"Changed Type"),List.Accumulate(Table.ToRows(#"Changed Type"),{},(x,y)=&amp;gt;if x={} then {y} else let a = List.Last(x) in if a{0}=y{0} and a{1}=y{1} and a{3} = y{2} then List.RemoveLastN(x,1)&amp;amp;{List.RemoveLastN(a,1)&amp;amp;{y{3}}} else x&amp;amp;{y}))&lt;BR /&gt;in&lt;BR /&gt;#"Changed Type"&lt;/P&gt;&lt;P&gt;===========================&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 13:12:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216062#M52461</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T13:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216128#M52463</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use Advanced Editor or formula bar, the step is a custom step shown in the screenshot&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
Source = Sql.Database("***.database.windows.net,1433", "DB Name", [Query="select * from [dbo].[Table Name] where Task in ('Ticket 1','Ticket 2');"]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Start", type datetime}}),
custom
=#table(Table.ColumnNames(#"Changed Type"),List.Accumulate(Table.ToRows(#"Changed Type"),{},(x,y)=&amp;gt;if x={} then {y} else let a = List.Last(x) in if a{0}=y{0} and a{1}=y{1} and a{3} = y{2} then List.RemoveLastN(x,1)&amp;amp;{List.RemoveLastN(a,1)&amp;amp;{y{3}}} else x&amp;amp;{y}))
in
custom&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;recommend to read his blog to understand M better&lt;/P&gt;
&lt;P&gt;&lt;A href="https://bengribaudo.com/blog/2017/11/17/4107/power-query-m-primer-part1-introduction-simple-expressions-let" target="_blank"&gt;https://bengribaudo.com/blog/2017/11/17/4107/power-query-m-primer-part1-introduction-simple-expressions-let&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 13:01:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216128#M52463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T13:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216174#M52468</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to fix the error, but it is not meeting the solution.&amp;nbsp; It is showing all the data as original it is not grouping based on group, start and end date.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 13:36:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216174#M52468</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T13:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216183#M52469</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is because your Start and End are different data types now, can't compare, you can go&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
Source = Sql.Database("***.database.windows.net,1433", "DB Name", [Query="select * from [dbo].[Table Name] where Task in ('Ticket 1','Ticket 2');"]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Start", type datetime},{"End",type datetime}}),
custom
=#table(Table.ColumnNames(#"Changed Type"),List.Accumulate(Table.ToRows(#"Changed Type"),{},(x,y)=&amp;gt;if x={} then {y} else let a = List.Last(x) in if a{0}=y{0} and a{1}=y{1} and a{3} = y{2} then List.RemoveLastN(x,1)&amp;amp;{List.RemoveLastN(a,1)&amp;amp;{y{3}}} else x&amp;amp;{y}))
in
custom&lt;/LI-CODE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
Source = Sql.Database("***.database.windows.net,1433", "DB Name", [Query="select * from [dbo].[Table Name] where Task in ('Ticket 1','Ticket 2');"]),
custom=#table(Table.ColumnNames(Source),List.Accumulate(Table.ToRows(Source),{},(x,y)=&amp;gt;if x={} then {y} else let a = List.Last(x) in if a{0}=y{0} and a{1}=y{1} and a{3} = y{2} then List.RemoveLastN(x,1)&amp;amp;{List.RemoveLastN(a,1)&amp;amp;{y{3}}} else x&amp;amp;{y}))
in
custom&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 13:44:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216183#M52469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-01T13:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216239#M52471</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;, Sorry if I keep asking. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this solution works even if there are multiple rows same group ?, example which i shared have details about 3 hops or 4 hops.. in real scenario if I have 20 hops with start and end dates it works. ? or do i need add "or" conditions..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 14:16:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216239#M52471</guid>
      <dc:creator>Shruthi96</dc:creator>
      <dc:date>2021-12-01T14:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216407#M52479</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp; can you try this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Csv.Document(File.Contents("C:\Users\user\Desktop\source\Book3.csv"),[Delimiter=",", Columns=4, Encoding=1252, QuoteStyle=QuoteStyle.None]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    CT = Table.TransformColumnTypes(#"Promoted Headers",{{"Task", type text}, {"Assignment group", type text}, {"Start", type datetime}, {"End", type datetime}}),
    src=CT[Assignment group],
    L2 = List.Generate(
                           ()=&amp;gt;[i=0, j=src{i}, k=try src{i-1} otherwise j, l=1],
                               each [i]&amp;lt;List.Count(src),
                               each [i=[i]+1,j=src{i}, k=try src{i-1} otherwise j, l=if k&amp;lt;&amp;gt;j then [l]+1 else [l]],
                               each [l]
    ),
    ColNames1 = Table.ColumnNames(CT),
    L1 = Table.ToColumns(CT),
    ColNames2 = List.Combine({ColNames1,{"Grouping"}}),
    Custom1 = Table.FromColumns(L1&amp;amp;{L2},ColNames2),
    #"Grouped Rows" = Table.Group(Custom1, {"Task", "Assignment group", "Grouping"}, {{"ad", each _, type table [Task=nullable text, Assignment group=nullable text, Start=nullable datetime, End=nullable datetime, Grouping=number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Start", each let x =[ad] 
    in List.Min(x[Start])),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "End", each let x =[ad] 
    in List.Max(x[End])),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom1",{"ad"})
in
    #"Removed Columns"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 01 Dec 2021 15:42:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2216407#M52479</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-12-01T15:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2217328#M52513</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="196150" data-lia-user-login="Shruthi96" class="lia-mention lia-mention-user"&gt;Shruthi96&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can test the code, it looks at Task, Group, Start and End. You can also try the way from&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;which is grouping I was trying to do.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 04:34:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Grouping-option/m-p/2217328#M52513</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-02T04:34:39Z</dc:date>
    </item>
  </channel>
</rss>

