<?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 the if condition for year and month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3002994#M101462</link>
    <description>&lt;P&gt;To convert the following tableau calculated field to Power BI Dax, which I faced issue while doing this.&lt;/P&gt;&lt;P&gt;STR(if year(TODAY()) = year([Calender]) and month(TODAY())= MONTH(Calender]]) then 1&lt;BR /&gt;elseif year(TODAY()) = year(Calender]) and&lt;BR /&gt;(month(TODAY())- MONTH(Calender])) &amp;gt;=0 then 1&lt;BR /&gt;elseif year(TODAY())-1 = year(Calender]) and&lt;BR /&gt;(month(TODAY())- MONTH(Calender])) &amp;lt; 0 then 1&lt;BR /&gt;else 0 end)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help with this is really appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2023 10:08:36 GMT</pubDate>
    <dc:creator>asdf1608</dc:creator>
    <dc:date>2023-01-05T10:08:36Z</dc:date>
    <item>
      <title>Need help with the if condition for year and month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3002994#M101462</link>
      <description>&lt;P&gt;To convert the following tableau calculated field to Power BI Dax, which I faced issue while doing this.&lt;/P&gt;&lt;P&gt;STR(if year(TODAY()) = year([Calender]) and month(TODAY())= MONTH(Calender]]) then 1&lt;BR /&gt;elseif year(TODAY()) = year(Calender]) and&lt;BR /&gt;(month(TODAY())- MONTH(Calender])) &amp;gt;=0 then 1&lt;BR /&gt;elseif year(TODAY())-1 = year(Calender]) and&lt;BR /&gt;(month(TODAY())- MONTH(Calender])) &amp;lt; 0 then 1&lt;BR /&gt;else 0 end)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help with this is really appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 10:08:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3002994#M101462</guid>
      <dc:creator>asdf1608</dc:creator>
      <dc:date>2023-01-05T10:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the if condition for year and month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3003494#M101514</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="489776" data-lia-user-login="asdf1608" class="lia-mention lia-mention-user"&gt;asdf1608&lt;/a&gt; ,Assuming calendar is name of date column, a new column like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Switch( True() , &lt;BR /&gt;year(TODAY()) = year([Calender]) &amp;amp;&amp;amp; month(TODAY())= MONTH(Calender]]), 1&lt;BR /&gt;year(TODAY()) = year(Calender]) &amp;amp;&amp;amp; (month(TODAY())- MONTH(Calender])) &amp;gt;=0 ,1&lt;BR /&gt;year(TODAY())-1 = year(Calender]) &amp;amp;&amp;amp; (month(TODAY())- MONTH(Calender])),1,0)&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 13:45:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3003494#M101514</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-05T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with the if condition for year and month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3003573#M101520</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your help&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 14:18:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-the-if-condition-for-year-and-month/m-p/3003573#M101520</guid>
      <dc:creator>asdf1608</dc:creator>
      <dc:date>2023-01-05T14:18:06Z</dc:date>
    </item>
  </channel>
</rss>

