<?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: IF-ELSE in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068649#M106367</link>
    <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="467836" data-lia-user-login="Anonymous_" class="lia-mention lia-mention-user"&gt;Anonymous_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column = IF ( [ColumName] IN {"a","b","c"}, [&lt;/SPAN&gt;&lt;SPAN&gt;ColumName&lt;/SPAN&gt;&lt;SPAN&gt;],&amp;nbsp;"h" )&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 10:23:10 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2023-02-08T10:23:10Z</dc:date>
    <item>
      <title>IF-ELSE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068516#M106354</link>
      <description>&lt;P&gt;My Input is like so:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to define 'd', 'e' and 'f' under a singular category and let everything else remain the same. So, somthing like If input is 'a', 'b' and 'c', then no change else mark them as 'h' or If my input is not 'a','b' or 'c', then rename them as 'h'.&lt;/P&gt;&lt;P&gt;Output -&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;How do I do this using DAX in an efficient manner?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S: There are many more rows with different that need to be defined under 'h', values for 'a','b' and 'c' are same everywhere.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 09:38:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068516#M106354</guid>
      <dc:creator>Anonymous_</dc:creator>
      <dc:date>2023-02-08T09:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: IF-ELSE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068534#M106355</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Not 100% sure of your request but I'll give a try :&lt;BR /&gt;Test Column = IF ( [ColumName] IN {"d","e","f"}, "h" )&lt;/P&gt;
&lt;P&gt;If you have many tests, you should consider using SWITCH function,&lt;/P&gt;
&lt;P&gt;or if you have many many tests, even consider in making a correpondance table and use merge of queries.&lt;/P&gt;
&lt;P&gt;Hope it helps, let us know&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 09:40:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068534#M106355</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2023-02-08T09:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: IF-ELSE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068649#M106367</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="467836" data-lia-user-login="Anonymous_" class="lia-mention lia-mention-user"&gt;Anonymous_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try like:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column = IF ( [ColumName] IN {"a","b","c"}, [&lt;/SPAN&gt;&lt;SPAN&gt;ColumName&lt;/SPAN&gt;&lt;SPAN&gt;],&amp;nbsp;"h" )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 10:23:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3068649#M106367</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-02-08T10:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: IF-ELSE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3089409#M108151</link>
      <description>&lt;P&gt;Thank you so much! The solution above worked, the [ColumnName] before, "h" is necessary to complete the query &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 04:34:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3089409#M108151</guid>
      <dc:creator>Anonymous_</dc:creator>
      <dc:date>2023-02-21T04:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: IF-ELSE</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3089415#M108153</link>
      <description>&lt;P&gt;If statements are good, but dont give you the ability to cleanly expand. I would go with something similiar to Freeman, but as such...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column = 
SWITCH(TRUE()
, IF ( [ColumName] IN {"a","b","c"}, [ColumName]
, "h" 
)

You can keep adding rules.....

Column = 
SWITCH(TRUE()
, IF ( [ColumName] IN {"a","b","c"}, [ColumName]
, IF ( [ColumName] IN {"e","f"}, "g"
, "h" 
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 21 Feb 2023 04:39:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-ELSE/m-p/3089415#M108153</guid>
      <dc:creator>BrianConnelly</dc:creator>
      <dc:date>2023-02-21T04:39:10Z</dc:date>
    </item>
  </channel>
</rss>

