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
Haya
Helper II
Helper II

Count number of tasks for each employee based on status

Dears, I have the following Data that shows employee task assignment and I would like to know for each employee, the number of in progress task, the number of completed task, the number of not started tasks.

 

Example of my data

TitleAssigned tostatus
Task 1 Haya, SaraIn progress
Task 2 SaraCompleted
Task 3Haya, Sara, Fahad, AmeenNot Started
Task 4 Ameen, Fahad, dalalIn Progess

 

My required table

 

NameIn Progress TasksNot Started TasksCompleted Tasks
Sara111
Haya110
Fahad110
Ameen110
Dalal100

 

   

 

The first issue that I've faced that I need to split (Assigned To) colom to rows based on delimeter. then, I've tried the following expression but the output was wrong

count = COUNTROWS(FILTER('Table','Table'[Status]="In Progress" && 'Table'[Assigned to]='Table'[Assigned to] ))
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Haya ,

 

You need to go to the query editor and split by delimiter option for the Assigned to column and then select the advance and choose the rows, this will give you a line per each user.

 

Then you just need to place the values in a matrix visualization with the following format:

  • Rows: Assigned to
  • Columns: Status
  • Values: Status (Count)

 

Check PBIX file attach.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

First, do data transformation/edit queries. There is an option to split column and convert to rows

 

https://community.powerbi.com/t5/Desktop/How-to-split-the-the-Column-into-Multiple-rows/td-p/253361

https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?GroupId=547&MessageK...

 

Once this is done you can easily calculate three measures.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

MFelix
Super User
Super User

Hi @Haya ,

 

You need to go to the query editor and split by delimiter option for the Assigned to column and then select the advance and choose the rows, this will give you a line per each user.

 

Then you just need to place the values in a matrix visualization with the following format:

  • Rows: Assigned to
  • Columns: Status
  • Values: Status (Count)

 

Check PBIX file attach.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thanks a lot @MFelix 

Now I have two tables, one for each project.

I want to show the same requried table but for the two projects combined.

How can I do it?

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.