Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Robmartinshp
Regular Visitor

Duplicate values removed from sum

Need your help BI wizards. I have a report for which an employees hours worked appear next to the associated date. This report also shows services rendered. So here's the rub. For a day like November 1st rob worked 8 hours. However, there may be multiple rows for November first because there were 3 separate services rendered. So... Instead of showing just 8 hours worked in the sum it shows 24. I need to calculate the sum of hours worked for that day without the duplicate / redundant rows adding

11/1/2017 service a 8
11/1/2017 service b 8
11/1/2017 service c 8

date service count hours worked
11/1/2017 3 8

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@Robmartinshp,

 

You may just change the aggregation to Count and Maximum.

https://docs.microsoft.com/en-us/power-bi/service-aggregates

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I created a calculated field in tableau that did the job.  Just have to do it in BI.  Below is my tableau field

{ FIXED [Date of Service], [Provider Name]:MIN([Hours])}

Yeah, I got that far.  The max works but only for a day.  For example 1 doctor on 1 day works just fine.  BUT.... if you then slice for a team of doctors and / or a range of dates where a max value in the column would then have to sum, you still just get the highest max value 😞   Here is an example

DoctorDate of ServiceService ProvidedHours Worked  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
 DateCount of ServicesHours worked for dayThis works fine when just showing 1 doc on one day 
Pete11/1/201759.5  
      
DoctorDate of ServiceService ProvidedHours WorkedThis is where it breaks if you show a team of docs or a range of dates 
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
Pete11/1/2017checkup9.5  
James11/1/2017checkup8  
James11/1/2017checkup8  
James11/1/2017checkup8  
James11/1/2017checkup8  
James11/1/2017checkup8  
 DateCount of ServicesHours worked for day  
 11/1/2017109.5This is what I get
   17.5This is what I need

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.