<?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: Error with the year change in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2266363#M54951</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="150936" data-lia-user-login="PaulOlding" class="lia-mention lia-mention-user"&gt;PaulOlding&lt;/a&gt;&amp;nbsp;mentioned, you can use below for including 2022:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(YEAR &amp;gt;= 2021&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(OR(YEAR = 2021, YEAR = 2022),&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IFYEAR = 2021 || YEAR = 2022,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and the error is for that&amp;nbsp;Week of Year, if that is the column name and you want to create measure, you need to use it in [ ] with an aggregation formula, like MAX(table[Week of Year]), otherwise, if that is a measure, you need to use it in [ ] lke this&amp;nbsp;[Week of Year], but if you want to create a calculated column you can just use the&amp;nbsp;table[Week of Year] in your formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 23:13:35 GMT</pubDate>
    <dc:creator>VahidDM</dc:creator>
    <dc:date>2022-01-04T23:13:35Z</dc:date>
    <item>
      <title>Error with the year change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2265359#M54856</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am getting the below error when refreshing a report with data that includes dates from 2022.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;How would I modify the formula to include 2022 with the same principle, like =IF(OR in excel?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 11:17:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2265359#M54856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-04T11:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Error with the year change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2265403#M54859</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could make it&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;IF(YEAR &amp;gt;= 2021, ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;then it'll work for 2023 too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DAX does have an OR function.&amp;nbsp; If you want to use that then it would be&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;IF(OR(YEAR = 2021, YEAR = 2022), ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Incidentally, is Week of Year a column name?&amp;nbsp; The syntax error is coming from there.&amp;nbsp; You should reference a column name like this&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;'Table Name'[Column Name]&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 11:37:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2265403#M54859</guid>
      <dc:creator>PaulOlding</dc:creator>
      <dc:date>2022-01-04T11:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error with the year change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2265630#M54882</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="150936" data-lia-user-login="PaulOlding" class="lia-mention lia-mention-user"&gt;PaulOlding&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 14:12:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2265630#M54882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-04T14:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error with the year change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2266363#M54951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="150936" data-lia-user-login="PaulOlding" class="lia-mention lia-mention-user"&gt;PaulOlding&lt;/a&gt;&amp;nbsp;mentioned, you can use below for including 2022:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(YEAR &amp;gt;= 2021&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IF(OR(YEAR = 2021, YEAR = 2022),&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;IFYEAR = 2021 || YEAR = 2022,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and the error is for that&amp;nbsp;Week of Year, if that is the column name and you want to create measure, you need to use it in [ ] with an aggregation formula, like MAX(table[Week of Year]), otherwise, if that is a measure, you need to use it in [ ] lke this&amp;nbsp;[Week of Year], but if you want to create a calculated column you can just use the&amp;nbsp;table[Week of Year] in your formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 23:13:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Error-with-the-year-change/m-p/2266363#M54951</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2022-01-04T23:13:35Z</dc:date>
    </item>
  </channel>
</rss>

