<?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: Pivot rows to columns in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2562080#M72915</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how about if I want each status to be a column.&amp;nbsp;&lt;BR /&gt;if there are two dates for Active status, i want two status column so that I can show a id went to active status status after an inactive status.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Jun 2022 20:39:44 GMT</pubDate>
    <dc:creator>bharukc</dc:creator>
    <dc:date>2022-06-06T20:39:44Z</dc:date>
    <item>
      <title>Pivot rows to columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545353#M71837</link>
      <description>&lt;P&gt;My data is like below&lt;/P&gt;&lt;P&gt;id. Status. Status date&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; Active. &amp;nbsp;2/14/18&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; Approved 2/15/17&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; In review &amp;nbsp;2/19/18&lt;/P&gt;&lt;P&gt;1. &amp;nbsp; Active. &amp;nbsp; &amp;nbsp; &amp;nbsp;3/15/19&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my result&lt;/P&gt;&lt;P&gt;id active. &amp;nbsp;Approved &amp;nbsp; In review&lt;/P&gt;&lt;P&gt;1 2/14/18. 2/15/17. &amp;nbsp; &amp;nbsp;2/19/18&lt;/P&gt;&lt;P&gt;1 3/15/19&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 15:39:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545353#M71837</guid>
      <dc:creator>bharukc</dc:creator>
      <dc:date>2022-05-28T15:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot rows to columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545361#M71840</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="365930" data-lia-user-login="bharukc" class="lia-mention lia-mention-user"&gt;bharukc&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;use a matrix visual. Place the id in rows and status inn columns and measure: SELECTEDVALUE ( TableName[Date] ) in values&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 15:47:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545361#M71840</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-28T15:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot rows to columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545413#M71851</link>
      <description>&lt;P&gt;I need to create pivoted table so that I can make gantt chart to show how many days does it take for each milestone.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 17:03:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545413#M71851</guid>
      <dc:creator>bharukc</dc:creator>
      <dc:date>2022-05-28T17:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot rows to columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545425#M71854</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="365930" data-lia-user-login="bharukc" class="lia-mention lia-mention-user"&gt;bharukc&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can achieve this in Power Query.&amp;nbsp;&lt;BR /&gt;Create a blank Query, go to the Advanced Editor, clear the existing code, and paste the codes give below and follow the steps.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXJMLsksSwUyjPQNTfQNLZRidaASBQVF+WWpKRApU31Dc7hUUWpZZmo5RMISRQ/MMGOwDkul2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Status = _t, #"Status Date" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Status", type text}, {"Status Date", type date}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"Status"}, {{"Count", each _, type table [ID=nullable number, Status=nullable text, Status Date=nullable date]}}),
    #"Removed Columns" = Table.RemoveColumns(#"Grouped Rows",{"Status"}),
    #"Added Custom" = Table.AddColumn(#"Removed Columns", "Custom", each Table.AddIndexColumn( [Count],"Index",1)),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Custom"}),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Removed Other Columns", "Custom", {"ID", "Status", "Status Date", "Index"}, {"ID", "Status", "Status Date", "Index"}),
    #"Removed Columns1" = Table.RemoveColumns(#"Expanded Custom",{"ID"}),
    #"Pivoted Column" = Table.Pivot(#"Removed Columns1", List.Distinct(#"Removed Columns1"[Status]), "Status", "Status Date")
in
    #"Pivoted Column"&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 17:19:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545425#M71854</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2022-05-28T17:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot rows to columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545464#M71859</link>
      <description>&lt;P&gt;You don't have to. You can calculate that without having you table pivotted. However, I have to say it might be easier to do the calculation while the table is pivoted.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2022 18:21:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2545464#M71859</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-05-28T18:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot rows to columns</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2562080#M72915</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how about if I want each status to be a column.&amp;nbsp;&lt;BR /&gt;if there are two dates for Active status, i want two status column so that I can show a id went to active status status after an inactive status.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 20:39:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Pivot-rows-to-columns/m-p/2562080#M72915</guid>
      <dc:creator>bharukc</dc:creator>
      <dc:date>2022-06-06T20:39:44Z</dc:date>
    </item>
  </channel>
</rss>

