March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |