<?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: Multiple dummy variables to one column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283648#M122011</link>
    <description>&lt;P&gt;That's what I feared to do. Can you help me with the code for the measure?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2023 12:29:27 GMT</pubDate>
    <dc:creator>Proggesnekka_v2</dc:creator>
    <dc:date>2023-06-14T12:29:27Z</dc:date>
    <item>
      <title>Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3268393#M121061</link>
      <description>&lt;P&gt;I have 3 dummy variables, D1-D3. Where I calculate the number of Customers with the measure “No. measure”.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I want to create a variable “Category”, to calculate the No.measure, &amp;nbsp;like shown below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to “undo” dummy variables in DAX? The data is stored in datawarehouse, so I can't transform the data in Query.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 12:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3268393#M121061</guid>
      <dc:creator>Proggesnekka_v2</dc:creator>
      <dc:date>2023-06-05T12:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3271605#M121281</link>
      <description>&lt;P&gt;this seems to be vaguely related:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dataap.org/blog/2021/06/25/pivot-your-table-in-dax/" target="_blank"&gt;PIVOT your table in DAX | Data Awareness Programme (dataap.org)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jun 2023 02:09:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3271605#M121281</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-06-07T02:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283572#M122003</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;I can't use the "data-tab". The data is stored in a datawarehouse, and D1-D3 is three different columns. Is it another way around?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 11:48:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283572#M122003</guid>
      <dc:creator>Proggesnekka_v2</dc:creator>
      <dc:date>2023-06-14T11:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283600#M122006</link>
      <description>&lt;P&gt;No, it's all manual labor from here on.&amp;nbsp; You have to create a measure that manually collects the data from all three columns.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:07:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283600#M122006</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-06-14T12:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283648#M122011</link>
      <description>&lt;P&gt;That's what I feared to do. Can you help me with the code for the measure?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:29:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283648#M122011</guid>
      <dc:creator>Proggesnekka_v2</dc:creator>
      <dc:date>2023-06-14T12:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283657#M122013</link>
      <description>&lt;P&gt;Since you won't be able to provide sample data for your scenario (data warehouse connection)&amp;nbsp; I won't be able to assist further. I have no access to any such environment.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:36:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283657#M122013</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-06-14T12:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283699#M122015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="570814" data-lia-user-login="Proggesnekka_v2" class="lia-mention lia-mention-user"&gt;Proggesnekka_v2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One of the way might be in Power query, not sure how is your table and other data but for the sample provided by you, it should work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data used:&lt;/P&gt;
&lt;TABLE width="294"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;D1&lt;/TD&gt;
&lt;TD width="64"&gt;D2&lt;/TD&gt;
&lt;TD width="64"&gt;D3&lt;/TD&gt;
&lt;TD width="102"&gt;No. measure&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;11492&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;6699&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;3272&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1324&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;353&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;0&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1345&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;698&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;P&gt;Just past above code in PQ and it should format the table in such way that then you can simply produce the result as below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:55:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283699#M122015</guid>
      <dc:creator>mahenkj2</dc:creator>
      <dc:date>2023-06-14T12:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple dummy variables to one column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283700#M122016</link>
      <description>&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlDSUTIEYjBtaGJppBSrEw0XAWEzM0tLuCBMwtjIHKISpgosaWxkAheEqTY2NUYxEqLQxBTFSBA2s7RQio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [D1 = _t, D2 = _t, D3 = _t, #"No. measure" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"D1", Int64.Type}, {"D2", Int64.Type}, {"D3", Int64.Type}, {"No. measure", Int64.Type}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"No. measure"}, "Attribute", "Value"),
    #"Renamed Columns" = Table.RenameColumns(#"Unpivoted Columns",{{"Attribute", "Category"}}),
    #"Filtered Rows" = Table.SelectRows(#"Renamed Columns", each ([Value] = 1)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Value"})
in
    #"Removed Columns"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Jun 2023 12:55:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-dummy-variables-to-one-column/m-p/3283700#M122016</guid>
      <dc:creator>mahenkj2</dc:creator>
      <dc:date>2023-06-14T12:55:50Z</dc:date>
    </item>
  </channel>
</rss>

