Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone, I have a table with time entry data for employees. I am working on a overtime dashboard. At the end I will need to have Total Schedule Hours, Overtime Hours and Overtime % (Overtime Hours/Total Schedule Hours). For me to calculate the Total Schedule Hours I need to extract only the schedule hours for 1 day, but in some cases I have employees that type in multiple codes of time entries and every time they do that I get a line with the daily schedule hours but I only need to add 1 line, not all.
Example:
Solved! Go to Solution.
@Anonymous,
So your requirement is to remove the duplicate rows if the user enter the same rows in different times, right? If you want to show the data in any chart in power bi, you don't need to write DAX function because the visual in power bi will filter duplicate rows automatically. If not, the best way to solve this is to write a trigger or delete the duplicates in database, for example, in SQL you may refer to: https://www.geeksforgeeks.org/sql-remove-duplicates-without-distinct/.
In addtion, you can also do this in power query, click query editor-> Remove Rows-> Remove Duplicates.
Regards,
Jimmy Tao
@Anonymous,
So your requirement is to remove the duplicate rows if the user enter the same rows in different times, right? If you want to show the data in any chart in power bi, you don't need to write DAX function because the visual in power bi will filter duplicate rows automatically. If not, the best way to solve this is to write a trigger or delete the duplicates in database, for example, in SQL you may refer to: https://www.geeksforgeeks.org/sql-remove-duplicates-without-distinct/.
In addtion, you can also do this in power query, click query editor-> Remove Rows-> Remove Duplicates.
Regards,
Jimmy Tao
You should be able to use DISTINCT or VALUES or maybe FIRSTNONBLANK with the right filters, etc. Or, just use SUMMARIZE with an AVERAGE or MAX or MIN.
You should be able to use DISTINCT or VALUES or maybe FIRSTNONBLANK with the right filters, etc. Or, just use SUMMARIZE with an AVERAGE or MAX or MIN.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |