Forum Discussion
Reporting on pending task
Hi everyone,
I am very new to Power Bi and would appreciate a bit of help with the current dilema. I have worked my way through building a dashboard for a project task completion status, however I got stuck at the following task:
I have two tables, the first listing all users contributing to a particular task and their current contribution status and the second table reports if the task still requires MULTIPLE user input, is COMPLETE or if one user is left to response then lists the user's name.
Table 1
| ID | NAME | STATUS |
| 1 | MARIA | PENDING |
| 1 | JOHN | COMPLETE |
| 1 | CHRIS | PENDING |
| 2 | MARIA | COMPLETE |
| 2 | ANNE | COMPLETE |
| 3 | MARIA | PENDING |
| 3 | CHRIS | COMPLETE |
| 3 | JAKE | COMPLETE |
Table 2
| ID | ReportStatus |
| 1 | MULTIPLE |
| 2 | COMPLETE |
| 3 | MARIA |
AndreiCapraru , I am hoping you need the report status in table 2.
Create a new column
new column =
var _1 = countx(filter(Table1, Table2[ID] = Table1[ID]), Table[ID])
var _2 = countx(filter(Table1, Table2[ID] = Table1[ID] && Table1[Status] ="COMPLETE"), Table[ID])
var _3 = maxx(filter(Table1, Table2[ID] = Table1[ID] && Table1[Status] ="PENDING"), Table[Name])
return
switch(true(),
_1=_2 , "COMPLETE",
_1 -_2 =1 , _3 ,
"MULTIPLE"
)
2 Replies
- amitchandakSuper User
AndreiCapraru , I am hoping you need the report status in table 2.
Create a new column
new column =
var _1 = countx(filter(Table1, Table2[ID] = Table1[ID]), Table[ID])
var _2 = countx(filter(Table1, Table2[ID] = Table1[ID] && Table1[Status] ="COMPLETE"), Table[ID])
var _3 = maxx(filter(Table1, Table2[ID] = Table1[ID] && Table1[Status] ="PENDING"), Table[Name])
return
switch(true(),
_1=_2 , "COMPLETE",
_1 -_2 =1 , _3 ,
"MULTIPLE"
)- AndreiCapraruNew Member
Thanks amitchandak , that worked perfectly and also learned something in the process 🙂