Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
I created these measure to determine the number of payroll periods in the year:
MINDate
2021MINdate = MIN('2021'[Date])
MAXdate
2021MAXdate = MAX('2021'[Date])
2021Weeks
2021Weeks = DATEDIFF([2021MINdate], [2021MAXdate], WEEK)
Number of Payroll periods
2021NumofPayroll = DIVIDE([2021Weeks], 2)
I get 25 as the number of payroll periods based on my 2021 payroll data.
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.
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.
I somewhat understand that PBI works in a row fashion so I understand why it's giving me the result of 1.
FYI - this data contains payroll codes so any COUNT expression would be tricky because one employee could have multiple paycodes during one payroll period.
Questions:
I'm presenting this to leadership this coming Tuesday (8/15) so any help is appreciated.
Thank you!
Linda
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
15 | |
11 | |
8 | |
8 |
User | Count |
---|---|
19 | |
15 | |
15 | |
14 | |
13 |