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
Anonymous
Not applicable

Summarizing the Attendee roles met in meetings by a manager

Appointments Table

AppointmentIDSubjectStart DateAttendees NameAttendeesIDAttendeesID Roles
1234-1111D365 Meeting11/03/2021ATTENDEE_1A001Manager
1234-1111D365 Meeting11/03/2021ATTENDEE_2A002Business Analyst
1234-1111D365 Meeting11/03/2021ATTENDEE_3A003Developer, Team Leader
1234-1111D365 Meeting11/03/2021ATTENDEE_4A004Functional Consultant
1234-1111D365 Meeting11/03/2021ATTENDEE_5A005Technical Consultant, Team Leader
4567-0000Power BI Meeting16/03/2021ATTENDEE_1A001Manager
4567-0000Power BI Meeting16/03/2021ATTENDEE_2A002Business Analyst
4567-0000Power BI Meeting16/03/2021ATTENDEE_3A003Developer, Team Leader
4567-0000Power BI Meeting16/03/2021ATTENDEE_6A006Project Manager
4567-0000Power BI Meeting16/03/2021ATTENDEE_7A007Functional Consultant
9822-2222Power Automate Meeting21/03/2021ATTENDEE_8A008Manager
9822-2222Power Automate Meeting21/03/2021ATTENDEE_6A006Project Manager
9822-2222Power Automate Meeting21/03/2021ATTENDEE_7A007Functional Consultant

 

Hi All

 

From the above Appointments table if a manager attends a few meetings, I want to get a summary of all AttendeeID Roles the manager has met.

 

For example, if I selected 'Attendee_1' (who is a manager) from a drop down list, I want to summarize in visualizations as below

 

Number of 'Business Analyst' met -    2

 

Number of  'Team leaders' met -    2

 

Number of  'Project Managers' met -    1

 

Please, can you kindly advise how this is possible through Power BI?

 

Thanks

 

Ayyappa

1 ACCEPTED SOLUTION
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

I added a column in M, you can use DAX calculated column as well, to specify your Roles

Vera_33_0-1615961417659.png

Table.AddColumn(#"Changed Type", "Role", each [a=Text.AfterDelimiter([AttendeesID Roles],", "),
b=if a = "" then [AttendeesID Roles] else a][b])

then a disconnected table contains distict roles only, and a measure to count (exclude the current attendee)

Vera_33_1-1615961511204.png

Count = 
VAR CurAttendee = SELECTEDVALUE(Appointment[AttendeesID])
VAR CurRole = SELECTEDVALUE('Table 2'[Role])
VAR Meeting =SELECTCOLUMNS( FILTER(Appointment,[AttendeesID]=CurAttendee),"meetingID",[AppointmentID])
VAR T1 = GROUPBY(FILTER(ALL(Appointment),Appointment[AppointmentID] IN Meeting && Appointment[AttendeesID]<>CurAttendee ),Appointment[AttendeesID],Appointment[Role])
RETURN
COUNTROWS(FILTER(T1, Appointment[Role]=CurRole))

 

View solution in original post

3 REPLIES 3
Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

I added a column in M, you can use DAX calculated column as well, to specify your Roles

Vera_33_0-1615961417659.png

Table.AddColumn(#"Changed Type", "Role", each [a=Text.AfterDelimiter([AttendeesID Roles],", "),
b=if a = "" then [AttendeesID Roles] else a][b])

then a disconnected table contains distict roles only, and a measure to count (exclude the current attendee)

Vera_33_1-1615961511204.png

Count = 
VAR CurAttendee = SELECTEDVALUE(Appointment[AttendeesID])
VAR CurRole = SELECTEDVALUE('Table 2'[Role])
VAR Meeting =SELECTCOLUMNS( FILTER(Appointment,[AttendeesID]=CurAttendee),"meetingID",[AppointmentID])
VAR T1 = GROUPBY(FILTER(ALL(Appointment),Appointment[AppointmentID] IN Meeting && Appointment[AttendeesID]<>CurAttendee ),Appointment[AttendeesID],Appointment[Role])
RETURN
COUNTROWS(FILTER(T1, Appointment[Role]=CurRole))

 

Anonymous
Not applicable

Hi @Vera_33 

 

Thank you very much for your help. This was very useful. 

 

I tried to mimic what you did..

 

Created 'Table 2' to contain the RoleID and Roles. Added the relationship between 'Appointment' table and 'Table 2'

Also created a 'Count' measure as you did.

When I placed my visualizations, I am getting the 'Count' as 'Blank'

I have added my screenshots..please can you kindly have a quick look to see where I am going wrong.

Many thanks

 

AppointmentAppointment

 

Table 2Table 2

 

RelationshipRelationship

 

Visualization and Count MeasureVisualization and Count Measure

 

 

Hi @Anonymous 

 

I was using a disconnected table2...so no relationship between the two tables. Have a try

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.