<?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: Sort by column not working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3484320#M44993</link>
    <description>&lt;P&gt;That should work if your column is a true time column and does not have a seconds component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue. &lt;BR /&gt;If you are unsure how to do that please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;If you want to get answers faster please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Oct 2023 23:06:20 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-10-18T23:06:20Z</dc:date>
    <item>
      <title>Sort by column not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3480913#M44960</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a visual that shows the time a person is called out to a job out of hours.&lt;/P&gt;&lt;P&gt;I can get it to show with an inverted normal distribution, where the x axis runs from 00:00 to 23:59&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sdavidson_3-1697540022074.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/982152i1ED63C2B0AA55DA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sdavidson_3-1697540022074.png" alt="sdavidson_3-1697540022074.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would prefer the axis to run from 18:00 - 06:00 to show this data in a normal distribution in the middle of the plot. (not wrapping around each end of the visual )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought i could do this by creating an index table (below), creating a relationship between the times and sorting the time by the index. But when i click on the time column and say 'sort by index', nothing changes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sdavidson_2-1697539920454.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/982150iF6D294AAB508E12C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sdavidson_2-1697539920454.png" alt="sdavidson_2-1697539920454.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If possible i would also like to group the data into 30 min slots to make it look a bit less busy but havent worked that bit out yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why my data isnt sorting? any help would be really appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 10:54:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3480913#M44960</guid>
      <dc:creator>sdavidson</dc:creator>
      <dc:date>2023-10-17T10:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sort by column not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3484320#M44993</link>
      <description>&lt;P&gt;That should work if your column is a true time column and does not have a seconds component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue. &lt;BR /&gt;If you are unsure how to do that please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;If you want to get answers faster please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 23:06:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3484320#M44993</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-18T23:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Sort by column not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3484989#M45000</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/323744"&gt;@sdavidson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your statement, I think you are using "Continuous" in X-aixs Type. I think you can select “Categorical” in X-axis Type.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vrzhoumsft_0-1697701171617.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/983265i915ADC2A531EB500/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vrzhoumsft_0-1697701171617.png" alt="vrzhoumsft_0-1697701171617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However this will expand your X-axis in your visual and show all time. Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vrzhoumsft_1-1697701476860.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/983269i5EDCAF4A96F2394F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vrzhoumsft_1-1697701476860.png" alt="vrzhoumsft_1-1697701476860.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can add a new Timegroup column and New Index for this group in Power Query Editor.&lt;/P&gt;
&lt;P&gt;New Time Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = List.Times(#time(18, 0, 0), 1440, #duration(0, 0, 1, 0)),
    #"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Time"}}),
    #"Changed Type" = Table.TransformColumnTypes(#"Renamed Columns",{{"Time", type time}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index for Time", 1, 1, Int64.Type),
    #"Inserted Hour" = Table.AddColumn(#"Added Index", "TimeGroup", each #time( Time.Hour([Time]),0,0)),
    #"Grouped Rows" = Table.Group(#"Inserted Hour", {"TimeGroup"}, {{"Rows", each _, type table [Time=nullable time, Index for Time=number, TimeGroup=time]}}),
    #"Added Index1" = Table.AddIndexColumn(#"Grouped Rows", "Index for TimeGroup", 1, 1, Int64.Type),
    #"Expanded Rows" = Table.ExpandTableColumn(#"Added Index1", "Rows", {"Time", "Index for Time"}, {"Rows.Time", "Rows.Index for Time"}),
    #"Reordered Columns" = Table.ReorderColumns(#"Expanded Rows",{"TimeGroup", "Index for TimeGroup", "Rows.Time", "Rows.Index for Time"}),
    #"Renamed Columns1" = Table.RenameColumns(#"Reordered Columns",{{"Rows.Time", "Time"}, {"Rows.Index for Time", "Index for Time"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns1",{{"Index for Time", Int64.Type}, {"TimeGroup", type time}})
in
    #"Changed Type1"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vrzhoumsft_2-1697702054661.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/983273i836AE414950D7498/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vrzhoumsft_2-1697702054661.png" alt="vrzhoumsft_2-1697702054661.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Sort TimeGroup by Index for TimeGroup and create a the visual. Result is as below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vrzhoumsft_3-1697702128034.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/983277i01ED4D0F30991FBD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vrzhoumsft_3-1697702128034.png" alt="vrzhoumsft_3-1697702128034.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;
&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;</description>
      <pubDate>Thu, 19 Oct 2023 07:56:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3484989#M45000</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-19T07:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sort by column not working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3485008#M45001</link>
      <description>&lt;P&gt;Thanks! Switching to categorical has sorted the x axis issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry im pretty new to BI, where do i enter the code for the time group table?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 08:03:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Sort-by-column-not-working/m-p/3485008#M45001</guid>
      <dc:creator>sdavidson</dc:creator>
      <dc:date>2023-10-19T08:03:35Z</dc:date>
    </item>
  </channel>
</rss>

