<?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: IF function based on date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155432#M113166</link>
    <description>&lt;P&gt;NewColumn=VAR _n=Table[FullName] RETURN IF(Table[Y_Fee_Calc]=0||COUNTROWS(FILTER(TOPN(8,FILTER(Table,Table[Y_Fee_Calc]&amp;gt;0),Table[Leavedate],ASC,Table[Y_Fee_Calc],DESC),Table[FullName]=_n)=0,"NOCAP","CAP")&lt;/P&gt;</description>
    <pubDate>Mon, 27 Mar 2023 08:03:07 GMT</pubDate>
    <dc:creator>wdx223_Daniel</dc:creator>
    <dc:date>2023-03-27T08:03:07Z</dc:date>
    <item>
      <title>IF function based on date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155373#M113162</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Have a DAX calculation I need to create, was hoping I could get some help with it. I have the below table for a recruiter. It looks at employees, the date they're leaving the company, and the fee associated with their leaving.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to create a DAX calculation that takes the first 8 employees with values for Y_Fee_Calc (ie &amp;gt; 0) based on leavedate and gives the result "CAP", otherwise "NOCAP".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in this dummy data below, it would take the first 8 based on their leave date (down as far as Michelle Harris) and give them "CAP", the last two would have "NOCAP". Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 07:44:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155373#M113162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-27T07:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: IF function based on date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155432#M113166</link>
      <description>&lt;P&gt;NewColumn=VAR _n=Table[FullName] RETURN IF(Table[Y_Fee_Calc]=0||COUNTROWS(FILTER(TOPN(8,FILTER(Table,Table[Y_Fee_Calc]&amp;gt;0),Table[Leavedate],ASC,Table[Y_Fee_Calc],DESC),Table[FullName]=_n)=0,"NOCAP","CAP")&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 08:03:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155432#M113166</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-03-27T08:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: IF function based on date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155481#M113171</link>
      <description>&lt;P&gt;Thank you so much for the quick reply! The calculation is definitely on the right track, but I seem to be getting an error when I enter it - COUNTROWS has too many filters, the maximum is 1. Is there any&amp;nbsp; way around this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 08:21:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3155481#M113171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-27T08:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: IF function based on date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3159680#M113428</link>
      <description>&lt;P&gt;please show your real code&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 02:06:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-function-based-on-date/m-p/3159680#M113428</guid>
      <dc:creator>wdx223_Daniel</dc:creator>
      <dc:date>2023-03-29T02:06:12Z</dc:date>
    </item>
  </channel>
</rss>

