<?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: Using IF Function based on filtered Month selection in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1404078#M25877</link>
    <description>&lt;P class="lia-align-left"&gt;Great thank you so much!!&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Just one more follow on query please..&lt;BR /&gt;&lt;BR /&gt;I'm playing around with the formula as i'm trying to get the first half of the year to have one result and the second half of the year to have a different result, i've tried this but it doesn't work:&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MONTH TEST = SWITCH( SELECTEDVALUE(Months[Month]), "Jan, Feb, Mar, Apr, May, June", 1, "Jul, Aug, Sep, Oct, Nov, Dec", 2)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Do you know how to do this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 30 Sep 2020 08:30:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-09-30T08:30:58Z</dc:date>
    <item>
      <title>Using IF Function based on filtered Month selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1387185#M25359</link>
      <description>&lt;P&gt;Hello, I am looking for some urgent help in fixing a DAX measure please.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am essentially trying to create a measure using the IF Function based on what Month has been filtered on in the dashbaord, eg) if Jan is selected i want one formula to be used and if September is selected i want a different formula to be used.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have the formulas for a False &amp;amp; True result from the if function ready but the trouble I am having is building the If Function formula and linking that to the Month table in the query, here is what I have so far when practicing with January, note I also tried "Jan";&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;= IF((SUM(Months[Month]) = {"1"})&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The Month table in the query is laid out like the following just for reference:&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Month&amp;nbsp; &amp;nbsp;Index&lt;/STRONG&gt;&lt;BR /&gt;Jan&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp;&lt;BR /&gt;Feb&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&lt;BR /&gt;etc etc&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am pretty new to this so any help would be greatly appreciated thank you so much in advance!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 11:43:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1387185#M25359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-22T11:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF Function based on filtered Month selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1387759#M25373</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt; - use SELECTEDVALUE on the month.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
SWITCH( SELECTEDVALUE(Month[Month]),
"Jan", FormulaA,
"Feb", FormulaB,
...
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SWITCH also helps you by not having imbedded IF statements.&amp;nbsp; Here is a good site to help you with the language:&amp;nbsp;&lt;A href="https://dax.guide/" target="_self"&gt;https://dax.guide/&lt;/A&gt; . It can give you more info on the functions mentioned here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 15:09:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1387759#M25373</guid>
      <dc:creator>dedelman_clng</dc:creator>
      <dc:date>2020-09-22T15:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using IF Function based on filtered Month selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1404078#M25877</link>
      <description>&lt;P class="lia-align-left"&gt;Great thank you so much!!&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-left"&gt;Just one more follow on query please..&lt;BR /&gt;&lt;BR /&gt;I'm playing around with the formula as i'm trying to get the first half of the year to have one result and the second half of the year to have a different result, i've tried this but it doesn't work:&lt;/P&gt;&lt;P class="lia-align-left"&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;MONTH TEST = SWITCH( SELECTEDVALUE(Months[Month]), "Jan, Feb, Mar, Apr, May, June", 1, "Jul, Aug, Sep, Oct, Nov, Dec", 2)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Do you know how to do this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 30 Sep 2020 08:30:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-IF-Function-based-on-filtered-Month-selection/m-p/1404078#M25877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-30T08:30:58Z</dc:date>
    </item>
  </channel>
</rss>

