<?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 New Hires Count in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3732298#M145454</link>
    <description>&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the count New Hires month wise as per following condition through DAX Calculation which is also mentioned in the sample Working Sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. There are two Employees Mr. Imtiaz and Mr. Hussain who have joined in Jan 01, 2023 but upon confirmation we generate New Code and new Date of Joining of the same month that is April 01, 2023. Their Date of Joining should be counted on Jan 01, 2023. We can calculate the count through CNIC column as well since the CNIC number is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I have slicer of Calendar [ Year ] and Calendar [ Month ].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Link of the files mentioned below for reference.&lt;/P&gt;&lt;P&gt;&lt;A title="https://drive.google.com/file/d/1f2A6KLuCjnq05UxS0xB8Li7XD-E9SqgG/view?usp=sharing" href="https://drive.google.com/file/d/1f2A6KLuCjnq05UxS0xB8Li7XD-E9SqgG/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1f2A6KLuCjnq05UxS0xB8Li7XD-E9SqgG/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Result Required&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Months&lt;/TD&gt;&lt;TD&gt;New joiners&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Saad Hanif&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Feb 2024 04:43:02 GMT</pubDate>
    <dc:creator>Saad_Hanif456</dc:creator>
    <dc:date>2024-02-29T04:43:02Z</dc:date>
    <item>
      <title>New Hires Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3732298#M145454</link>
      <description>&lt;P&gt;Dear Experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to calculate the count New Hires month wise as per following condition through DAX Calculation which is also mentioned in the sample Working Sheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. There are two Employees Mr. Imtiaz and Mr. Hussain who have joined in Jan 01, 2023 but upon confirmation we generate New Code and new Date of Joining of the same month that is April 01, 2023. Their Date of Joining should be counted on Jan 01, 2023. We can calculate the count through CNIC column as well since the CNIC number is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I have slicer of Calendar [ Year ] and Calendar [ Month ].&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Link of the files mentioned below for reference.&lt;/P&gt;&lt;P&gt;&lt;A title="https://drive.google.com/file/d/1f2A6KLuCjnq05UxS0xB8Li7XD-E9SqgG/view?usp=sharing" href="https://drive.google.com/file/d/1f2A6KLuCjnq05UxS0xB8Li7XD-E9SqgG/view?usp=sharing" target="_self"&gt;https://drive.google.com/file/d/1f2A6KLuCjnq05UxS0xB8Li7XD-E9SqgG/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Result Required&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Months&lt;/TD&gt;&lt;TD&gt;New joiners&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Regards,&lt;/P&gt;&lt;P&gt;Saad Hanif&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 04:43:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3732298#M145454</guid>
      <dc:creator>Saad_Hanif456</dc:creator>
      <dc:date>2024-02-29T04:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: New Hires Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3733383#M145500</link>
      <description>&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="493667" data-lia-user-login="Saad_Hanif456" class="lia-mention lia-mention-user"&gt;Saad_Hanif456&lt;/a&gt; ,&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;You have not specified anything about relationship between 'Calendar' and 'Payroll' table.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Considering you have an active relationship with 'Hiring date'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Head Count =&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;([CNIC ])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;If not, considering you have an active relationship with 'Payroll Month' and a inactive relationship with 'Hiring date'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;Head Count =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[CNIC&amp;nbsp;]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;USERELATIONSHIP&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payroll&lt;/SPAN&gt;&lt;SPAN&gt;[Hiring Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;I hope this will help you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 29 Feb 2024 11:30:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3733383#M145500</guid>
      <dc:creator>VillyMBI</dc:creator>
      <dc:date>2024-02-29T11:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: New Hires Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3733527#M145504</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543620" data-lia-user-login="VillyMBI" class="lia-mention lia-mention-user"&gt;VillyMBI&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Thank you so much for the response.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Relationship is with Calendar [date] and Payroll Month [Date]&lt;BR /&gt;&lt;BR /&gt;The result is not coming up what is required. I have got the hire count by your Dax suggestion but the employee the employee named Mr. Imtiaz hired in Jan 01, 2023. he is also reflecting in the month of April 2023 since his data of joining has been changed upon confirmation and I want his headcount comes onlyon the first hiring date i.e. Jan 01, 2023 when he was first hired&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please add your input, if you have got the understanding of it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Saad Hanif&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 12:28:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3733527#M145504</guid>
      <dc:creator>Saad_Hanif456</dc:creator>
      <dc:date>2024-02-29T12:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: New Hires Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3733634#M145511</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="493667" data-lia-user-login="Saad_Hanif456" class="lia-mention lia-mention-user"&gt;Saad_Hanif456&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;Please find updated &lt;A title="Hiring Pbix" href="https://drive.google.com/file/d/1DfStW1R80qKqrxivEj9i_IyTs9l7sIIM/view?usp=drive_link" target="_self"&gt;Hiring.pbix&lt;/A&gt;&amp;nbsp; file.&lt;BR /&gt;I have added new relationship with Hiring Date as inactive.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 13:19:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3733634#M145511</guid>
      <dc:creator>VillyMBI</dc:creator>
      <dc:date>2024-02-29T13:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: New Hires Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3736678#M145651</link>
      <description>&lt;P&gt;Once again thank you &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="543620" data-lia-user-login="VillyMBI" class="lia-mention lia-mention-user"&gt;VillyMBI&lt;/a&gt;. I have got the New Hires Count but did not get the result that is required.&lt;/P&gt;&lt;P&gt;This Dax Expression Count the same Mr. Imtiaz name twice in Jan 01, 2023 and April 01, 2023 whereas i want his count reflected when he appointed first that is Jan 01, 2023.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 16:13:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3736678#M145651</guid>
      <dc:creator>Saad_Hanif456</dc:creator>
      <dc:date>2024-03-01T16:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: New Hires Count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3741795#M145923</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="493667" data-lia-user-login="Saad_Hanif456" class="lia-mention lia-mention-user"&gt;Saad_Hanif456&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try below DAX&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Head Count =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_selectedMonthYear&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;"YYYY-MM"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_table&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payroll&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;[CNIC&amp;nbsp;]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"HDdate"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;FORMAT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;[Hiring Date]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;"YYYY-MM"&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt; &lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_table&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;[HDdate]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;_selectedMonthYear&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;SPAN&gt;&lt;BR /&gt;I hope this will help you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Mar 2024 05:51:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/New-Hires-Count/m-p/3741795#M145923</guid>
      <dc:creator>VillyMBI</dc:creator>
      <dc:date>2024-03-05T05:51:46Z</dc:date>
    </item>
  </channel>
</rss>

