<?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 DAX formula datesbetween in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-formula-datesbetween/m-p/1322707#M23279</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm new to powerbi dax and any help is appreciated.&lt;/P&gt;&lt;P&gt;What I'm trying to achive and I don't succeed is to create a new column or a measure in a table where the below condition&amp;nbsp;takes place :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(table.[due date] &amp;gt;=&lt;SPAN&gt;FirstDayofCurrentYear&amp;nbsp;&lt;/SPAN&gt;and table.[due date] &amp;lt;= &lt;SPAN&gt;LastDayofCurrentYear&amp;nbsp;&lt;/SPAN&gt;, table[amount] , 0)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What I have done so far : I created a new column named &lt;STRONG&gt;CurrentYearAmount&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;CurrentYearAmount&lt;/STRONG&gt;=if(DATESBETWEEN('table'[due date],[FirstDayofCurrentYear],[LastDayofCurrentYear],'table'[amount],0)) - is it ok?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FirstDayofCurrentYearSold = DATE(YEAR(TODAY()),1,1) is my measure that calculates my start date from current year&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LastDayofCurrentYearSold = ??? how do I make that&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;I'm stuck at this point and I don't know what to do next.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Maybe I didn't take the right approach to do this so other ideas are welcome also.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance, and sorry for my bad english &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Bogdan&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Aug 2020 12:35:05 GMT</pubDate>
    <dc:creator>PowerBiName</dc:creator>
    <dc:date>2020-08-25T12:35:05Z</dc:date>
    <item>
      <title>Need help with DAX formula datesbetween</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-formula-datesbetween/m-p/1322707#M23279</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm new to powerbi dax and any help is appreciated.&lt;/P&gt;&lt;P&gt;What I'm trying to achive and I don't succeed is to create a new column or a measure in a table where the below condition&amp;nbsp;takes place :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(table.[due date] &amp;gt;=&lt;SPAN&gt;FirstDayofCurrentYear&amp;nbsp;&lt;/SPAN&gt;and table.[due date] &amp;lt;= &lt;SPAN&gt;LastDayofCurrentYear&amp;nbsp;&lt;/SPAN&gt;, table[amount] , 0)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;What I have done so far : I created a new column named &lt;STRONG&gt;CurrentYearAmount&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;STRONG&gt;CurrentYearAmount&lt;/STRONG&gt;=if(DATESBETWEEN('table'[due date],[FirstDayofCurrentYear],[LastDayofCurrentYear],'table'[amount],0)) - is it ok?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FirstDayofCurrentYearSold = DATE(YEAR(TODAY()),1,1) is my measure that calculates my start date from current year&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;LastDayofCurrentYearSold = ??? how do I make that&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;I'm stuck at this point and I don't know what to do next.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Maybe I didn't take the right approach to do this so other ideas are welcome also.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance, and sorry for my bad english &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Bogdan&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 12:35:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-formula-datesbetween/m-p/1322707#M23279</guid>
      <dc:creator>PowerBiName</dc:creator>
      <dc:date>2020-08-25T12:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with DAX formula datesbetween</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-formula-datesbetween/m-p/1322744#M23280</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="254935" data-lia-user-login="PowerBiName" class="lia-mention lia-mention-user"&gt;PowerBiName&lt;/a&gt; , what are trying to achieve here &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can join due date with date table and you can have a year there and filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ot have formula like&lt;/P&gt;
&lt;P&gt;measure =&lt;BR /&gt;var _min = date(year(today()),1,1)&lt;BR /&gt;var _max = date(year(today()),12,31)&lt;/P&gt;
&lt;P&gt;return &lt;BR /&gt;calculate(countrows(Table) , filter(Table, table[date]&amp;gt;=_min &amp;amp;&amp;amp; table[date] &amp;lt;=_max))&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2020 12:47:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-with-DAX-formula-datesbetween/m-p/1322744#M23280</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-25T12:47:10Z</dc:date>
    </item>
  </channel>
</rss>

