<?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: Measure calculate function with few filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2735634#M83888</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="427806" data-lia-user-login="IlyaF" class="lia-mention lia-mention-user"&gt;IlyaF&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to filter by the current year then you will have to surround the column (&lt;SPAN&gt;Timestamp Entered State) by year function so the updated measure will be like:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Abandoned_new = calculate(
count(
'Apps &amp;amp; Grants'[Grant ID]),
('Apps &amp;amp; Grants'[Current State]="Abandoned"||
'Apps &amp;amp; Grants'[Current State]="Withdrawn" ||
'Apps &amp;amp; Grants'[Current State]="Declined" ||
'Apps &amp;amp; Grants'[Current State]="To Delete"),

Year('Apps &amp;amp; Grants'[Timestamp Entered State])= YEAR(TODAY())

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AnthonyJoseph&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 14:53:46 GMT</pubDate>
    <dc:creator>AnthonyJoseph</dc:creator>
    <dc:date>2022-08-30T14:53:46Z</dc:date>
    <item>
      <title>Measure calculate function with few filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2705998#M82054</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following measure:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Abandoned = calculate(&lt;BR /&gt;count(&lt;BR /&gt;'Apps &amp;amp; Grants'[Grant ID]),&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="Abandoned"||&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="Withdrawn" ||&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="Declined" ||&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="To Delete"&lt;/P&gt;&lt;P&gt;)​&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I would like to add another filter with a date, to calculate the same measure only for the current year, based on the 'TimeStamp' column that I have in the table. So I tried the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Abandoned = calculate(&lt;BR /&gt;count(&lt;BR /&gt;'Apps &amp;amp; Grants'[Grant ID]),&lt;BR /&gt;('Apps &amp;amp; Grants'[Current State]="Abandoned"||&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="Withdrawn" ||&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="Declined" ||&lt;BR /&gt;'Apps &amp;amp; Grants'[Current State]="To Delete"),&lt;/P&gt;&lt;P&gt;'Apps &amp;amp; Grants'[Timestamp Entered State]=YEAR(TODAY())&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it seems to be wrong as I am getting the same result &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;What am I doing wrong?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 17 Aug 2022 09:19:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2705998#M82054</guid>
      <dc:creator>IlyaF</dc:creator>
      <dc:date>2022-08-17T09:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculate function with few filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2715279#M82648</link>
      <description>&lt;P&gt;No, that looks syntactically correct.&amp;nbsp; Check your data - maybe your timestamp is not a numeric year?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way you can slightly simplify your filter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Abandoned = calculate(
count('Apps &amp;amp; Grants'[Grant ID]),
'Apps &amp;amp; Grants'[Current State] IN {"Abandoned","Withdrawn",Declined","To Delete"},
'Apps &amp;amp; Grants'[Timestamp Entered State]=YEAR(TODAY())
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Aug 2022 22:23:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2715279#M82648</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-08-21T22:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculate function with few filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2734184#M83817</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;lbendlin, thanks for your reply.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My timestamp field is in a Short Date format:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;And still, when filtering only the 'Current State' field, the result is fine (79).&lt;BR /&gt;But when adding the 'Timestamp' field filter, I get a Blank result while when filtering the data itself manually, the result should be 10.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 06:30:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2734184#M83817</guid>
      <dc:creator>IlyaF</dc:creator>
      <dc:date>2022-08-30T06:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculate function with few filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2735634#M83888</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="427806" data-lia-user-login="IlyaF" class="lia-mention lia-mention-user"&gt;IlyaF&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to filter by the current year then you will have to surround the column (&lt;SPAN&gt;Timestamp Entered State) by year function so the updated measure will be like:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Abandoned_new = calculate(
count(
'Apps &amp;amp; Grants'[Grant ID]),
('Apps &amp;amp; Grants'[Current State]="Abandoned"||
'Apps &amp;amp; Grants'[Current State]="Withdrawn" ||
'Apps &amp;amp; Grants'[Current State]="Declined" ||
'Apps &amp;amp; Grants'[Current State]="To Delete"),

Year('Apps &amp;amp; Grants'[Timestamp Entered State])= YEAR(TODAY())

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope this helps&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;AnthonyJoseph&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 14:53:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2735634#M83888</guid>
      <dc:creator>AnthonyJoseph</dc:creator>
      <dc:date>2022-08-30T14:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Measure calculate function with few filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2736994#M83958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;AnthonyJoseph,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thanks! This helped &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 05:30:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-calculate-function-with-few-filters/m-p/2736994#M83958</guid>
      <dc:creator>IlyaF</dc:creator>
      <dc:date>2022-08-31T05:30:10Z</dc:date>
    </item>
  </channel>
</rss>

