Forum Discussion
Combine Multiple Fields in a Slicer
OK, what does it mean that a person has worked 42 hours on this "Project A, Project B, Project C, Project D"? How do you want to allocate 42 hours to the individual projects? If there are no weights assigned to the projects, then the only sensible allocation is just a simple division of the hours among all the projects. Right?
I have work hours data against each project for every person. I need to accommodate that part here in this excel.
- Anonymous5 years agoNot applicable
OK. So why are you not showing this part here? This is an integral part of the problem and you're keeping it away...
- Anonymous5 years agoNot applicable
These individual hours are coming from odd sources so I just put them together like this. Maybe not the best way. Splitting the Projects column in Power BI with a delimiter seems to be only static because the number of projects may vary.
Employee Work Hours Leave Hours Week Number Projects Project Hours John 34 8 1 Project A, Project B 20+14 Derek 42 0 1 Project C 42 Michael 42 0 1 Project B, Project C 30+12 William 42 0 1 Project C, Project D 20+22 John 42 0 2 Project D 42 Derek 34 8 2 Project A, ProjectB 30+4 Michael 42 0 2 Project B, Project C 20+22 William 42 0 2 Project A, Project B, Project C, Project D 10+10+10+10+2 John 42 0 3 Project C, Project D 30+12 Derek 42 0 3 Project B, Project C, Project D 10+10+22 Michael 26 16 3 Project D 26 William 42 0 3 Project D 42 John 42 0 4 Project A, ProjectB 30+12 Derek 34 8 4 Project C, Project D 20+14 Michael 42 0 4 Project D 42 William 42 0 4 Project B, Project C 20+22 - Anonymous5 years agoNot applicable
It does not matter that the number of projects can vary. Power Query is powerful enough to handle this gracefully but it might require some intervention in the M code. I want to see the raw data that you get, not data after "some processing". I bet you don't get data in the form "20+22+32."