<?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 statement in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068557#M46779</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;it still displays (Blank) instead of zero im afraid&lt;/P&gt;</description>
    <pubDate>Fri, 10 Sep 2021 09:39:18 GMT</pubDate>
    <dc:creator>edcdcpowerbi</dc:creator>
    <dc:date>2021-09-10T09:39:18Z</dc:date>
    <item>
      <title>Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068521#M46773</link>
      <description>&lt;P&gt;I am needing to add a third if statement below, which replaces blank values with a 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On its own it works fine, the other two if statements work without this third being added.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i correctly insert this Third IF statement, as it stands i get a semantic error saying 'Too many arguments passed, 3 is the maximum'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;ISBLANK( SliderValue ),0, SliderValue,&lt;BR /&gt;IF( SliderValue &amp;gt; 0, ProjRR,&lt;BR /&gt;IF(SliderValue = 0, Actual)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:05:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068521#M46773</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2021-09-10T09:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068541#M46776</link>
      <description>&lt;P&gt;Hello there &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324851" data-lia-user-login="edcdcpowerbi" class="lia-mention lia-mention-user"&gt;edcdcpowerbi&lt;/a&gt;&amp;nbsp;, you already have three arguments in the highlighted part of your code. Therefore, all your arguments after it are causing the error. I think you can remove the "SliderValue" argument, or use a SWITCH() function instead of nested IFs() since it behaves almost like an IF THEN ELSE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;&lt;STRONG&gt;ISBLANK( SliderValue ),0, SliderValue,&lt;/STRONG&gt;&lt;BR /&gt;IF( SliderValue &amp;gt; 0, ProjRR,&lt;BR /&gt;IF(SliderValue = 0, Actual)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answer solves your problem! If you need any additional help please tag me in your reply.&lt;BR /&gt;If my reply provided you with a solution, pleased mark it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or give it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:25:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068541#M46776</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2021-09-10T09:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068544#M46777</link>
      <description>&lt;P&gt;Thanks for the help&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;.&amp;nbsp;i did try to remove SliderValue, but to no avail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did try the switch statement but it return True, instead of the values i wanted, where have i gone wrong?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SWITCH(SliderValue,&lt;BR /&gt;IF(ISBLANK(SliderValue),0,SliderValue),&lt;BR /&gt;SliderValue = 0, Actual,&lt;BR /&gt;SliderValue&amp;gt;0,ProjRR&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:34:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068544#M46777</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2021-09-10T09:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068552#M46778</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324851" data-lia-user-login="edcdcpowerbi" class="lia-mention lia-mention-user"&gt;edcdcpowerbi&lt;/a&gt;try this!&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SWITCH(
TRUE(),
ISBLANK(SliderValue),0,
SliderValue = 0, Actual,
SliderValue &amp;gt; 0,ProjRR,
SliderValue
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answer solves your problem! If you need any additional help please tag me in your reply.&lt;BR /&gt;If my reply provided you with a solution, pleased mark it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or give it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:35:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068552#M46778</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2021-09-10T09:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068557#M46779</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;it still displays (Blank) instead of zero im afraid&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:39:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068557#M46779</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2021-09-10T09:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068560#M46780</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="324851" data-lia-user-login="edcdcpowerbi" class="lia-mention lia-mention-user"&gt;edcdcpowerbi&lt;/a&gt;&amp;nbsp;please send the full formula then. What is the SliderValue?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:40:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068560#M46780</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2021-09-10T09:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068577#M46781</link>
      <description>&lt;P&gt;sure, here it is&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="301004" data-lia-user-login="goncalogeraldes" class="lia-mention lia-mention-user"&gt;goncalogeraldes&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;VAR Actual = [Recycling Rate (PET)]&lt;BR /&gt;VAR AverageR = [Median Recycling Rate (PET)]&lt;BR /&gt;VAR SliderValue = [PETRecyclingRateOverride Value]&lt;BR /&gt;VAR ProjRR =&lt;BR /&gt;IF( SliderValue &amp;gt; 0, DIVIDE( SliderValue, 100, 0 ), Actual ) //var AverageRR = IF (SliderValue &amp;gt; 0, DIVIDE(SliderValue,100,0), AverageR)&lt;BR /&gt;RETURN&lt;BR /&gt;//IF ( SELECTEDVALUE (Jurisdiction[DRS Status]) = "Existing DRS" , ProjRR, AverageRR)&lt;BR /&gt;&lt;BR /&gt;SWITCH(&lt;BR /&gt;TRUE(),&lt;BR /&gt;ISBLANK(SliderValue),0,&lt;BR /&gt;SliderValue = 0, Actual,&lt;BR /&gt;SliderValue &amp;gt; 0,ProjRR,&lt;BR /&gt;SliderValue&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:42:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068577#M46781</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2021-09-10T09:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068617#M46782</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The way DAX handles BLANKS can be somewhat confusing so in this case it can be something related to DAX never considering the value to be blank and evaluating it as FALSE everytime. A possible workaround can be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SWITCH(
TRUE(),
SliderValue = BLANK(), 0,
SliderValue = 0, Actual,
SliderValue &amp;gt; 0, ProjRR,
SliderValue
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check out this &lt;A href="https://www.sqlbi.com/articles/blank-handling-in-dax/" target="_self"&gt;article&lt;/A&gt; as it may help you in this case or in a similar one in the future!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this answer solves your problem! If you need any additional help please tag me in your reply.&lt;BR /&gt;If my reply provided you with a solution, pleased mark it as a solution &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt; or give it a kudoe &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Gonçalo Geraldes&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:55:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068617#M46782</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2021-09-10T09:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068620#M46783</link>
      <description>&lt;P&gt;that worked perfectly, thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:54:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068620#M46783</guid>
      <dc:creator>edcdcpowerbi</dc:creator>
      <dc:date>2021-09-10T09:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF statement</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068622#M46784</link>
      <description>&lt;P&gt;Glad to be of help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 09:55:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Nested-IF-statement/m-p/2068622#M46784</guid>
      <dc:creator>goncalogeraldes</dc:creator>
      <dc:date>2021-09-10T09:55:58Z</dc:date>
    </item>
  </channel>
</rss>

