<?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 Using Payroll data to figure capacity by team throughout Year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Payroll-data-to-figure-capacity-by-team-throughout-Year/m-p/3376988#M157574</link>
    <description>&lt;P&gt;I'm working on Payroll data and I'm stuck trying to determine the % of the year worked per employee. My table name is 2021&lt;/P&gt;&lt;P&gt;I created these measure to determine the number of payroll periods in the year:&lt;/P&gt;&lt;P&gt;MINDate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021MINdate = MIN('2021'[Date])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MAXdate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021MAXdate = MAX('2021'[Date])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2021Weeks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021Weeks = DATEDIFF([2021MINdate], [2021MAXdate], WEEK)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Number of Payroll periods&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021NumofPayroll = DIVIDE([2021Weeks], 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get 25 as the number of payroll periods based on my 2021 payroll data.&lt;/P&gt;&lt;P&gt;When I use 2021NumofPayroll measure in tabular form along with the division and name of employee, it gives me the number of payroll periods each employee worked that year.&lt;/P&gt;&lt;P&gt;Where I've run into a problem is that I would like to take that info and divide it by the 2021NumofPayroll (which the aggregate is 25) so that I can get the % the employee worked, but when I create another measure it gives me 1 for each employee.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I somewhat understand that PBI works in a row fashion so I understand why it's giving me the result of 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI - this data contains payroll codes so any COUNT expression would be tricky because one employee could have multiple paycodes during one payroll period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What expression do I need to use in order for it to be able to calculate the # of pay periods by emp so that I can get the % for the year? For example, John worked for 5 pay periods of 25, the measure should calculate 25%.&lt;/LI&gt;&lt;LI&gt;I'm also having issue bringing in a column from a related table that shows the number of employees allocated by division. The relationship from my payroll data to the related table is a many to one. I've tried having the relationship go from the related table to the payroll table so it's a one to many but PBI keeps changing. I don't know if that makes a difference or not. Anyway, I want to take the number of employees from the related table to show what the full capacity of the division should be, so that I can compare to the ACTUAL capacity during the year, which accounts from the vacancies throughout the year. My issue is when I go to create an expression to get the percentage, I use RELATED in the payroll data set but it doesn't recognize the table that contains the employee count by division.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm presenting this to leadership this coming Tuesday (8/15) so any help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;</description>
    <pubDate>Sat, 12 Aug 2023 16:53:34 GMT</pubDate>
    <dc:creator>3Jk33f3</dc:creator>
    <dc:date>2023-08-12T16:53:34Z</dc:date>
    <item>
      <title>Using Payroll data to figure capacity by team throughout Year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Payroll-data-to-figure-capacity-by-team-throughout-Year/m-p/3376988#M157574</link>
      <description>&lt;P&gt;I'm working on Payroll data and I'm stuck trying to determine the % of the year worked per employee. My table name is 2021&lt;/P&gt;&lt;P&gt;I created these measure to determine the number of payroll periods in the year:&lt;/P&gt;&lt;P&gt;MINDate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021MINdate = MIN('2021'[Date])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MAXdate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021MAXdate = MAX('2021'[Date])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2021Weeks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021Weeks = DATEDIFF([2021MINdate], [2021MAXdate], WEEK)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Number of Payroll periods&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2021NumofPayroll = DIVIDE([2021Weeks], 2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get 25 as the number of payroll periods based on my 2021 payroll data.&lt;/P&gt;&lt;P&gt;When I use 2021NumofPayroll measure in tabular form along with the division and name of employee, it gives me the number of payroll periods each employee worked that year.&lt;/P&gt;&lt;P&gt;Where I've run into a problem is that I would like to take that info and divide it by the 2021NumofPayroll (which the aggregate is 25) so that I can get the % the employee worked, but when I create another measure it gives me 1 for each employee.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I somewhat understand that PBI works in a row fashion so I understand why it's giving me the result of 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI - this data contains payroll codes so any COUNT expression would be tricky because one employee could have multiple paycodes during one payroll period.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;What expression do I need to use in order for it to be able to calculate the # of pay periods by emp so that I can get the % for the year? For example, John worked for 5 pay periods of 25, the measure should calculate 25%.&lt;/LI&gt;&lt;LI&gt;I'm also having issue bringing in a column from a related table that shows the number of employees allocated by division. The relationship from my payroll data to the related table is a many to one. I've tried having the relationship go from the related table to the payroll table so it's a one to many but PBI keeps changing. I don't know if that makes a difference or not. Anyway, I want to take the number of employees from the related table to show what the full capacity of the division should be, so that I can compare to the ACTUAL capacity during the year, which accounts from the vacancies throughout the year. My issue is when I go to create an expression to get the percentage, I use RELATED in the payroll data set but it doesn't recognize the table that contains the employee count by division.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm presenting this to leadership this coming Tuesday (8/15) so any help is appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Linda&lt;/P&gt;</description>
      <pubDate>Sat, 12 Aug 2023 16:53:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Using-Payroll-data-to-figure-capacity-by-team-throughout-Year/m-p/3376988#M157574</guid>
      <dc:creator>3Jk33f3</dc:creator>
      <dc:date>2023-08-12T16:53:34Z</dc:date>
    </item>
  </channel>
</rss>

