<?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: unpivot the data and consider the context in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583671#M74227</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;You're welcome. It is slightly more complicated in DAX but it can be done. Take a look at these articles :&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;Unpivot using DAX&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://simplifypowerbi.com/?p=325" target="_blank"&gt;https://simplifypowerbi.com/?p=325&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pivot using DAX&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dataap.org/blog/2021/06/25/pivot-your-table-in-dax/" target="_blank"&gt;https://dataap.org/blog/2021/06/25/pivot-your-table-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark this answer as the solution if it resolves your issue.&lt;BR /&gt;Appreciate your kudos!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Rohit&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 16:19:33 GMT</pubDate>
    <dc:creator>rohit_singh</dc:creator>
    <dc:date>2022-06-16T16:19:33Z</dc:date>
    <item>
      <title>unpivot the data and consider the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2582866#M74172</link>
      <description>&lt;P&gt;Hi, I want to create a combo visual and so the data needed is one common axis column and two values,&lt;/P&gt;&lt;P&gt;I could't find a way to create visual with the original data, the data seems need to be unpivoted and there are many others fiters to be considered, like location and other columns not listed.&lt;/P&gt;&lt;P&gt;I am new user of DAX and ask for help,&amp;nbsp; could this problem can be solved use DAX?&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 06:14:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2582866#M74172</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-17T06:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: unpivot the data and consider the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583255#M74196</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Copy and paste this M-code into a blank query to get the details of each step.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTIEYmMgNkeiTZVidaKVnKAiRmARBG0OlnUG6UXWbARXDpJ2AbLMkDQZI5THxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Location = _t, bar_month1 = _t, bar_month2 = _t, bar_month3 = _t, line_month1 = _t, line_month2 = _t, line_month3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Location", type text}, {"bar_month1", Int64.Type}, {"bar_month2", Int64.Type}, {"bar_month3", Int64.Type}, {"line_month1", Int64.Type}, {"line_month2", Int64.Type}, {"line_month3", Int64.Type}}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Location"}, "Attribute", "Value"),
    #"Split Column by Delimiter" = Table.SplitColumn(#"Unpivoted Other Columns", "Attribute", Splitter.SplitTextByDelimiter("_", QuoteStyle.Csv), {"Attribute.1", "Attribute.2"}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Attribute.1", type text}, {"Attribute.2", type text}}),
    #"Pivoted Column" = Table.Pivot(#"Changed Type1", List.Distinct(#"Changed Type1"[Attribute.1]), "Attribute.1", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Pivoted Column",{{"Attribute.2", "Month"}})
in
    #"Renamed Columns"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will give you the expected result&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Rohit&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Please mark this answer as the solution if it resolves your issue. &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Appreciate your kudos! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 13:08:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583255#M74196</guid>
      <dc:creator>rohit_singh</dc:creator>
      <dc:date>2022-06-16T13:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: unpivot the data and consider the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583270#M74197</link>
      <description>&lt;P&gt;Thank you very much, I will try it, and by the way, if I use DAX create a calculation that use switch, could it be possible to solve that?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 13:16:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583270#M74197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T13:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: unpivot the data and consider the context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583671#M74227</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;You're welcome. It is slightly more complicated in DAX but it can be done. Take a look at these articles :&lt;BR /&gt;&lt;STRONG&gt;&lt;BR /&gt;Unpivot using DAX&lt;/STRONG&gt;&lt;BR /&gt;&lt;A href="https://simplifypowerbi.com/?p=325" target="_blank"&gt;https://simplifypowerbi.com/?p=325&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pivot using DAX&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://dataap.org/blog/2021/06/25/pivot-your-table-in-dax/" target="_blank"&gt;https://dataap.org/blog/2021/06/25/pivot-your-table-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark this answer as the solution if it resolves your issue.&lt;BR /&gt;Appreciate your kudos!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Rohit&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 16:19:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/unpivot-the-data-and-consider-the-context/m-p/2583671#M74227</guid>
      <dc:creator>rohit_singh</dc:creator>
      <dc:date>2022-06-16T16:19:33Z</dc:date>
    </item>
  </channel>
</rss>

