<?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 Need Help with IF Statement in a Measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/694026#M628</link>
    <description>&lt;P&gt;I have 3 tables (excel tabs) linked to produce my report ( Data, FY2018, FY2019). "Data" table contains "FiscalYear" column.&lt;/P&gt;&lt;P&gt;The goal is to get the Gauge Visual to display values from FY2018 table if 'Data'[FiscalYear] = 2018 and from FY2019 if&amp;nbsp;'Data'[FiscalYear] = 2019.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help with the query for the Measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2019 19:03:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-17T19:03:09Z</dc:date>
    <item>
      <title>Need Help with IF Statement in a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/694026#M628</link>
      <description>&lt;P&gt;I have 3 tables (excel tabs) linked to produce my report ( Data, FY2018, FY2019). "Data" table contains "FiscalYear" column.&lt;/P&gt;&lt;P&gt;The goal is to get the Gauge Visual to display values from FY2018 table if 'Data'[FiscalYear] = 2018 and from FY2019 if&amp;nbsp;'Data'[FiscalYear] = 2019.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help with the query for the Measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 19:03:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/694026#M628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-17T19:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with IF Statement in a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/694143#M630</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; here is sample measure, this is just to give you an example how you can change the value based on selected value, you can change it to meet you need&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;My Total = 
VAR __selectedFiscalYear = SELECTEDVALUE( Data[FiscalYear] )
RETURN
IF( __selectedFiscalYear = 2018, SUM( FY2018[Amount] ), 
IF( __selectedFiscalYear = 2019, SUM( FY2019[Amount ) 
)&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 May 2019 03:25:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/694143#M630</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2019-05-18T03:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with IF Statement in a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/698673#M748</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="507" data-lia-user-login="parry2k" class="lia-mention lia-mention-user"&gt;parry2k&lt;/a&gt;&amp;nbsp;Thank you so much for your reply! I had to modify the syntax of the formula to make it work to IF( __selectedFiscalYear = 2018, SUM( FY2018[Amount], SUM( FY2019[Amount] ). So yes, it solved my origianl problem. However, now I have to make it more complex: IF a,&amp;nbsp;THEN x, ELSEIF b, THEN y, ELSE z&lt;/P&gt;&lt;P&gt;Is there an easy what to do that? Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 18:29:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/698673#M748</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-23T18:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with IF Statement in a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/698745#M749</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; Yes you can multiple nest if statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if ( your condition, True value, if( your condition, true value, if ( your condition, true value, false value ) ) )&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 20:04:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/698745#M749</guid>
      <dc:creator>parry2k</dc:creator>
      <dc:date>2019-05-23T20:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with IF Statement in a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/702622#M845</link>
      <description>&lt;P&gt;Thank you very much! It worked.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 17:11:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/702622#M845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-29T17:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help with IF Statement in a Measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/703714#M867</link>
      <description>&lt;P&gt;You could also use switch to evaluate your conditionas, is like having multiple ifs....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SWITCH(&amp;lt;expression&amp;gt;, &amp;lt;value&amp;gt;, &amp;lt;result&amp;gt;[, &amp;lt;value&amp;gt;, &amp;lt;result&amp;gt;]…[, &amp;lt;else&amp;gt;])&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 19:44:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-Help-with-IF-Statement-in-a-Measure/m-p/703714#M867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-30T19:44:59Z</dc:date>
    </item>
  </channel>
</rss>

