<?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: Nested if statment with IN claus in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083392#M107600</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="515962" data-lia-user-login="DebbieStubbs67" class="lia-mention lia-mention-user"&gt;DebbieStubbs67&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hard coded method would be&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;New Column =
SWITCH (
    TRUE (),
    'Table'[Code] IN { "A1", "A2", "A3" }, "A Group",
    'Table'[Code] IN { "B1", "B2", "B3" }, "B Group",
    'Table'[Code] IN { "C1", "C2", "C3" }, "A Group"
)&lt;/LI-CODE&gt;
&lt;P&gt;Other dynamic methods could also be possible but requires real examples.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2023 13:24:23 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-02-16T13:24:23Z</dc:date>
    <item>
      <title>Nested if statment with IN claus</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083347#M107596</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iif i have a column with a list of codes, (eg A01, A02,A03, B01, B02, B03, C01, C02,C03), How would i create a sutom colum like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if code in A01, A02,A03 then A Group&lt;/P&gt;&lt;P&gt;if code in&amp;nbsp;B01, B02, B03 then B Group&lt;/P&gt;&lt;P&gt;if code in&amp;nbsp;C01, C02,C03) then C Group&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure of the syntaax, In SQL I would use a case statement and in cluases, but cant work out the syntx for power BI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;therefore making&lt;/P&gt;&lt;P&gt;codes&amp;nbsp; &amp;nbsp; New Column&lt;/P&gt;&lt;P&gt;A01&amp;nbsp; &amp;nbsp; &amp;nbsp; A Group&lt;/P&gt;&lt;P&gt;A02&amp;nbsp; &amp;nbsp; &amp;nbsp; A Group&lt;/P&gt;&lt;P&gt;A03&amp;nbsp; &amp;nbsp; &amp;nbsp; A Group&lt;/P&gt;&lt;P&gt;B01&amp;nbsp; &amp;nbsp; &amp;nbsp; B&amp;nbsp;Group&lt;/P&gt;&lt;P&gt;B02&amp;nbsp; &amp;nbsp; &amp;nbsp; B&amp;nbsp;Group&lt;/P&gt;&lt;P&gt;B03&amp;nbsp; &amp;nbsp; &amp;nbsp; B&amp;nbsp;Group&lt;/P&gt;&lt;P&gt;C01&amp;nbsp; &amp;nbsp; &amp;nbsp; C&amp;nbsp;Group&lt;/P&gt;&lt;P&gt;C02&amp;nbsp; &amp;nbsp; &amp;nbsp;C&amp;nbsp;Group&lt;/P&gt;&lt;P&gt;C03&amp;nbsp; &amp;nbsp; C&amp;nbsp;Group&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 12:55:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083347#M107596</guid>
      <dc:creator>DebbieStubbs67</dc:creator>
      <dc:date>2023-02-16T12:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if statment with IN claus</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083392#M107600</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="515962" data-lia-user-login="DebbieStubbs67" class="lia-mention lia-mention-user"&gt;DebbieStubbs67&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hard coded method would be&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;New Column =
SWITCH (
    TRUE (),
    'Table'[Code] IN { "A1", "A2", "A3" }, "A Group",
    'Table'[Code] IN { "B1", "B2", "B3" }, "B Group",
    'Table'[Code] IN { "C1", "C2", "C3" }, "A Group"
)&lt;/LI-CODE&gt;
&lt;P&gt;Other dynamic methods could also be possible but requires real examples.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 13:24:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083392#M107600</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-16T13:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nested if statment with IN claus</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083986#M107658</link>
      <description>&lt;P&gt;That is Spot on, Just what I need, Many Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 20:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-if-statment-with-IN-claus/m-p/3083986#M107658</guid>
      <dc:creator>DebbieStubbs67</dc:creator>
      <dc:date>2023-02-16T20:30:13Z</dc:date>
    </item>
  </channel>
</rss>

