<?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 DAX code help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376127#M127129</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it looks like it is not well formatted. you should firstly check the commas and parenthesis position.&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2023 10:34:22 GMT</pubDate>
    <dc:creator>Fabrizio1</dc:creator>
    <dc:date>2023-08-11T10:34:22Z</dc:date>
    <item>
      <title>IF DAX code help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376006#M127128</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Morning all, HAPPY FRIDAY!!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please could someone help with the below DAX code as it will not work for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Column 2 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Report 1'&lt;/SPAN&gt;&lt;SPAN&gt;[Destination ID]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"IOMA"&lt;/SPAN&gt;&lt;SPAN&gt;,(&lt;/SPAN&gt;&lt;SPAN&gt;'Report 1'&lt;/SPAN&gt;&lt;SPAN&gt;[Destination ID]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"IOMRT"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Report 1'&lt;/SPAN&gt;&lt;SPAN&gt;[Destination ID]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"UK653"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Report 1'&lt;/SPAN&gt;&lt;SPAN&gt;[Destination ID]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"IOM"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;Isle&lt;/SPAN&gt; &lt;SPAN&gt;of&lt;/SPAN&gt; &lt;SPAN&gt;Man&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;James&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 Aug 2023 09:34:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376006#M127128</guid>
      <dc:creator>JamesMurg</dc:creator>
      <dc:date>2023-08-11T09:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF DAX code help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376127#M127129</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;it looks like it is not well formatted. you should firstly check the commas and parenthesis position.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:34:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376127#M127129</guid>
      <dc:creator>Fabrizio1</dc:creator>
      <dc:date>2023-08-11T10:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: IF DAX code help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376130#M127130</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="601810" data-lia-user-login="Fabrizio1" class="lia-mention lia-mention-user"&gt;Fabrizio1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Could you help me put it in the correct format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 10:37:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376130#M127130</guid>
      <dc:creator>JamesMurg</dc:creator>
      <dc:date>2023-08-11T10:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: IF DAX code help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376286#M127139</link>
      <description>&lt;P&gt;I guess you wanted to write a measure like this (even if I'm not sure that all the 4 ID described should be evaluated in an AND condition. Can they be all true at the same time?):&lt;/P&gt;&lt;P&gt;Column 2 =&lt;BR /&gt;IF(&lt;BR /&gt;AND(&lt;BR /&gt;'Report 1'[Destination ID]="IOMA",&lt;BR /&gt;'Report 1'[Destination ID]="IOMRT",&lt;BR /&gt;'Report 1'[Destination ID]="UK653",&lt;BR /&gt;'Report 1'[Destination ID]="IOM"),&lt;BR /&gt;"Isle of Man")&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 12:06:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376286#M127139</guid>
      <dc:creator>Fabrizio1</dc:creator>
      <dc:date>2023-08-11T12:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: IF DAX code help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376410#M127145</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="536805" data-lia-user-login="JamesMurg" class="lia-mention lia-mention-user"&gt;JamesMurg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You haven't defined the correct structure for the formula. First of all, IF takes 3 parameters&amp;nbsp; (condition, what you will do if condition is met, otherwise).&lt;BR /&gt;On the other hand, if you want to check if Destination ID is IOMA, IOMRT, UK653 or IOM you cannot use "AND", you should use "OR". Also, the formula cannot take more than two parameters, so you will need to use "||" operator.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Therefore you should have something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Column 2 =
IF('Report 1'[Destination ID]="IOMA" ||'Report 1'[Destination ID]="IOMRT"|| 'Report 1'[Destination ID]="UK653"|| 'Report 1'[Destination ID]="IOM",
"Isle of Man",
&amp;lt;value in other case&amp;gt;)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2023 13:38:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3376410#M127145</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-08-11T13:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: IF DAX code help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3413205#M129081</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="536805" data-lia-user-login="JamesMurg" class="lia-mention lia-mention-user"&gt;JamesMurg&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you checked this?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Sep 2023 06:56:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-DAX-code-help/m-p/3413205#M129081</guid>
      <dc:creator>mlsx4</dc:creator>
      <dc:date>2023-09-04T06:56:40Z</dc:date>
    </item>
  </channel>
</rss>

