Forum Discussion
leon_taljaard
4 years agoFrequent Visitor
Power Bi Desktop staff activities time sheet
Hi There, Please could someone assist. I am not that familiar with Power Bi. I am trying to work out how many hours someone has worked from SharePoint list data into Power Bi Desktop. Now I ha...
- 4 years ago
Thanks for reaching out to us.
Does your data source have an activity id field? If not, you need to increase it, otherwise it is impossible to distinguish different activities with overlapping time
Sample data
create 2 measures, DAX code:
time = DATEDIFF( MIN('Table'[Activity Start Time]),MIN('Table'[Activity End Time]),MINUTE)/60Measure = var _activityID=SELECTEDVALUE('Table'[activity ID]) var _time=MAXX(FILTER(ALL('Table'),'Table'[activity ID]=_activityID),[time]) var _staffname= SELECTEDVALUE('Table'[Staff Name]) return "Staff Name: "&_staffname&UNICHAR(10)&"activity ID: "&_activityID&UNICHAR(10)&"time: "&_timeresult
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
leon_taljaard
4 years agoFrequent Visitor
I think I found the solution!!
So, the one thing that I had that I could use which was similar to the activity ID that needed to be the same for the Saff member, I had the actioned by field which I used instead of the ID field and that seems to have done the trick.
I would not have been able to get to it without v-xiaotang , thank you!