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.
Hello,
I have the below data and for some reason when I set the value of my Hours field below to Sum of Hours it doubles the data instead of giving a correct sum.
Worker | Hours | Date |
W | 0.01 | 4/29/2021 |
W | 1.61 | 4/29/2021 |
W | 1.67 | 4/29/2021 |
W | 7.64 | 4/29/2021 |
When I change Hours to Sum of Hours I get the below result
Worker | Sum of Hours | Date |
W | 21.86 | 4/29/2021 |
The expected result is 10.93 but for some reason Power Bi appears to be doubling the values it is summing.
Any help would be appreciated.
Thanks,
Zach
Solved! Go to Solution.
Hi @ZachRoberts ,
One reason is that there are duplicate identical rows. It will not display duplicate rows in Power BI. Please check whether there are duplicate rows in your data source table.
The solution is to add an index column.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.v
Hi @ZachRoberts ,
One reason is that there are duplicate identical rows. It will not display duplicate rows in Power BI. Please check whether there are duplicate rows in your data source table.
The solution is to add an index column.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.v
Yea there does appear to be duplicate entries in our data - started with just my table of the hours and worked through it there to find the issue. Will work to fix why we have duplicate entries now haha
Thanks everyone for your help
Hi,
Drag Worker to the Table visual and write this measure
Hours worked = sum(Data[Hours])
Hope this helps.
@Ashish_Mathur thank you for the reply but that didn't work for me still got the doubled value
Hi,
Share the link from where i can download your PBI file.
Hi @ZachRoberts !
Pleae make sure you don't have any active relationship which are causing this. Please paste your Data Model diagram here.
Regards,
Hasham
Thanks for the reply - Please see the below screenshots of the relationship
Thanks,
Zach
Hi @ZachRoberts !
Please check by placing columns only from [JCT] table into table / matrix visual if you are able to get correct result for particular day.
Regards,
Hasham
Please see the screenshot below - all fields are from the JCT table
Is it an issue with the values and how they related to the date fields? Would still expect the hours to be able to sum for the correct value though
Thank you
Hi @ZachRoberts !
Try to remove Consumption Date from visual. Also please share sample file as some relationship is causing the duplicates to be reurned.
Regards,
Hasham
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |