<?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: Help with dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4886857#M186086</link>
    <description>&lt;P&gt;Thankyou, &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;for your response.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hi uc,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We appreciate your question on the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on my understanding of the issue, please find attached a screenshot and a sample PBIX file that may assist in resolving the matter:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;We hope the information provided helps to resolve the issue. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Nov 2025 16:57:47 GMT</pubDate>
    <dc:creator>v-pnaroju-msft</dc:creator>
    <dc:date>2025-11-26T16:57:47Z</dc:date>
    <item>
      <title>Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4885457#M186056</link>
      <description>&lt;P&gt;Hello, I wanted to know the number of employees who are active between the financial year 2024/25 (April 2024 to MAr 2025).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample table is given below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Registration Date&lt;/TD&gt;&lt;TD&gt;Deduction Date&lt;/TD&gt;&lt;TD&gt;Person ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.02.2024&lt;/TD&gt;&lt;TD&gt;25.02.2025&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2023&lt;/TD&gt;&lt;TD&gt;15.06.2024&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2015&lt;/TD&gt;&lt;TD&gt;24.06.2019&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.02.2019&lt;/TD&gt;&lt;TD&gt;22.02.2023&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;27.03.2021&lt;/TD&gt;&lt;TD&gt;16.09.2023&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.03.2025&lt;/TD&gt;&lt;TD&gt;15.03.2025&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;17.08.2024&lt;/TD&gt;&lt;TD&gt;31.12.2024&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03.03.2023&lt;/TD&gt;&lt;TD&gt;12.12.2024&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;26.04.2024&lt;/TD&gt;&lt;TD&gt;12.12.2024&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2024&lt;/TD&gt;&lt;TD&gt;08.08.2024&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24.03.2025&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2025&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.02.2024&lt;/TD&gt;&lt;TD&gt;23.03.2025&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2025&lt;/TD&gt;&lt;TD&gt;06.06.2025&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02.04.2025&lt;/TD&gt;&lt;TD&gt;30.09.2025&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result table must be as below where the latest registration is on or before 31/03/2025 and the deduction date can be empty (which implies they are still active) or&amp;nbsp; must be on or after 01/04/2024. Can you please help with the dax code for this requirement? Thanks in advance.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Registration Date&lt;/TD&gt;&lt;TD&gt;Deducted date&lt;/TD&gt;&lt;TD&gt;Person ID&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24.03.2025&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2025&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.02.2024&lt;/TD&gt;&lt;TD&gt;25.03.2025&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2025&lt;/TD&gt;&lt;TD&gt;06.06.2025&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01.01.2024&lt;/TD&gt;&lt;TD&gt;08.08.2024&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 25 Nov 2025 12:56:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4885457#M186056</guid>
      <dc:creator>uc</dc:creator>
      <dc:date>2025-11-25T12:56:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4885466#M186057</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="299274" data-lia-user-login="uc" class="lia-mention lia-mention-user"&gt;uc&lt;/a&gt;&amp;nbsp;, With a date tbale having active join Registration date and inactive join with Deducted date&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Current Employees = CALCULATE(COUNTx(FILTER(Employee,Employee[Registration Date]&amp;lt;=max('Date'[Date]) &amp;amp;&amp;amp; (ISBLANK(Employee[Deducted Date]) || Employee[Deducted Date]&amp;gt;max('Date'[Date]))),(Employee[Person Id ])),CROSSFILTER(Employee[Registration&amp;nbsp; Date],'Date'[Date],None))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Refer to the file attached after the signature&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI: HR Analytics - Employees as on Date : &lt;A href="https://youtu.be/e6Y-l_JtCq4" target="_blank"&gt;https://youtu.be/e6Y-l_JtCq4&lt;/A&gt; &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970&lt;/A&gt;&lt;BR /&gt;Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: &lt;A href="https://youtu.be/fvgcx8QLqZU" target="_blank"&gt;https://youtu.be/fvgcx8QLqZU&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Nov 2025 13:04:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4885466#M186057</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2025-11-25T13:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4886857#M186086</link>
      <description>&lt;P&gt;Thankyou, &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;for your response.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Hi uc,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;We appreciate your question on the Microsoft Fabric Community Forum.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Based on my understanding of the issue, please find attached a screenshot and a sample PBIX file that may assist in resolving the matter:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;We hope the information provided helps to resolve the issue. Should you have any further queries, kindly feel free to contact the Microsoft Fabric community.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Nov 2025 16:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4886857#M186086</guid>
      <dc:creator>v-pnaroju-msft</dc:creator>
      <dc:date>2025-11-26T16:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4887123#M186092</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you can create a measure which will give output as 0 or 1 based on your data and then add it to your table visual.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IsActive_FY2425 = 
VAR FY_Start = DATE(2024, 4, 1)  // if you want you can take this from slicer using selected value
VAR FY_End   = DATE(2025, 3, 31)  // if you want you can take this from slicer using selected value

-- 1. Get the current row context from the visual
VAR CurrentPerson = SELECTEDVALUE('YourTable'[Person ID])
VAR CurrentReg    = SELECTEDVALUE('YourTable'[Registration Date])
VAR CurrentDed    = SELECTEDVALUE('YourTable'[Deduction Date])

-- 2. Find the LATEST Registration Date (Chronologically)
-- We only care that the registration happened before the FY ended.
VAR MaxValidRegDate = 
    CALCULATE(
        MAX('YourTable'[Registration Date]),
        FILTER(
            ALLEXCEPT('YourTable', 'YourTable'[Person ID]),
            'YourTable'[Registration Date] &amp;lt;= FY_End
        )
    )

RETURN
    IF(
        -- Check A: Is this the Latest Record?
        CurrentReg = MaxValidRegDate 
        &amp;amp;&amp;amp; 
        -- Check B: Is the Deduction Date Valid?
        -- (Logic: It is BLANK (Active) OR it is AFTER the FY Start)
        (
            ISBLANK(CurrentDed) || CurrentDed &amp;gt;= FY_Start
        ),
        1, 
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1b1ejEADIsZEzUQ5QRAiFHViWy417Uxmr/view?usp=sharing" target="_self"&gt;Sample PBIX.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give kudos or mark it as solution once confirmed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praful&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 04:29:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4887123#M186092</guid>
      <dc:creator>Praful_Potphode</dc:creator>
      <dc:date>2025-11-27T04:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4887570#M186103</link>
      <description>&lt;P&gt;Thanks a lot. Much appreciated&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Nov 2025 10:56:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4887570#M186103</guid>
      <dc:creator>uc</dc:creator>
      <dc:date>2025-11-27T10:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4888110#M186110</link>
      <description>&lt;P&gt;Hello Praful, thankyou the code works! can you please show me how to set up a slicer in your sample file so that the FY_Start and FY_End can be changed to any date. Thankyou in advance&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 06:43:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4888110#M186110</guid>
      <dc:creator>uc</dc:creator>
      <dc:date>2025-11-28T06:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4888190#M186113</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="299274" data-lia-user-login="uc" class="lia-mention lia-mention-user"&gt;uc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Please check if this is what is expecetd.&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1pQgT_iOloBC1_gMBQIhN6TcN_eTSakwN/view?usp=sharing" target="_self"&gt;sample PBIx Page 2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give kudos once confirmed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praful&lt;/P&gt;</description>
      <pubDate>Fri, 28 Nov 2025 07:58:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4888190#M186113</guid>
      <dc:creator>Praful_Potphode</dc:creator>
      <dc:date>2025-11-28T07:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4890799#M186185</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 14:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Help-with-dax/m-p/4890799#M186185</guid>
      <dc:creator>uc</dc:creator>
      <dc:date>2025-12-02T14:28:08Z</dc:date>
    </item>
  </channel>
</rss>

