Forum Discussion

AndreiCapraru's avatar
AndreiCapraru
New Member
5 years ago
Solved

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

IDNAMESTATUS
1MARIAPENDING
1JOHNCOMPLETE
1CHRISPENDING
2MARIACOMPLETE
2ANNECOMPLETE
3MARIAPENDING
3CHRISCOMPLETE
3JAKECOMPLETE

 

Table 2

IDReportStatus
1MULTIPLE
2COMPLETE
3MARIA
  • 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

  • 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"
    )