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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Jonas_Bertels
New Member

Group By with some data split over categories

Hi all,

 

I have a data set with time entries. Amongst other things, they need to fill in hours worked & project for each day. I have then grouped these projects into 3 project category.

 

What I would like to do is to group the time entries by Employee and then show the time worked, but split over the project catogeries. Can someone help me out on how to transform the table?

 

To help visualize the problem:

PersonHoursProjectProject type
A81 - client a1
B81 - client a1
A62 - bussiness development2
A21 - client a1
B83 - internal3
C81 - client C1
C81 - client a1

 

I would like to get someting in the trend of the following table:

 

PersonTime - projecttype1Time - projecttype2Time - projecttype3
A1060
B808
C1600

 

If someone could help me achieve this, it would be wonderful. Thanks already.

Kind regards,

Jonas

1 ACCEPTED SOLUTION

Hi @Jonas_Bertels , 

If you want to show 0 in matrix, you could refer to below table in my sample, if not, you could refer to first table in my sample.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Jonas_Bertels , if you take a matrix and put a person on row, project type on column and hours on values (Take summarization as sum)

It should work

 

If you need exact text then create a new column like

New Project Type = "Time - projecttype " & [Project Type]

 

Use this on column

 

Hi Amitchandak,

 

Thank you for this solution, it does work. As a follow-up question, is it possible to add 2 columns to this matrix? One where we take the percentage of type 1 hours and type 2 hours over all hours (type 1+2+3) (in %), and one where we take the type 1 hours over the total hours (in %).

Hi @Jonas_Bertels , 

If you want to show 0 in matrix, you could refer to below table in my sample, if not, you could refer to first table in my sample.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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