This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hello-
I have a calculation for obtaining hours from the past 12 months based on the effective date of an action. I am running into an issue when there are multiple actions that have occurred in the dataset where the first value calculates the correct sum of hours; however, the second value is the sum of all hours regardless of date. What am I missing in my calculation to account for these multiple records to calculate appropriately for each instance?
| EE ID | Effective Date | Hours |
| 1234 | 1/7/2024 | 570.50 |
| 1234 | 10/26/2025 | 3,524.61 |
The hours for 1/7/2024 is correct. The hours for 10/26/2025 is incorrect and should be 1,431.54, but instead it's totalling all hours the employee has in the hours table.
Thanks in advance for any assistance!!
Solved! Go to Solution.
@TCatron18 You are using DATEDIFF incorrectly here. DATEDIFF calculates the difference between two dates, it does not return an actual date value. But, because a date is technically a number, you aren't getting an error. Try using EOMONTH instead of DATEDIFF to return an actual date.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 35 | |
| 32 | |
| 26 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 39 | |
| 33 | |
| 24 | |
| 23 |