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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
vinkesh-serene
Frequent Visitor

Get the Power BI report from three related tables.

Hello Everyone,

 

Having some isues creating a Power BI report from three related tables, Scenario is:

I have three tables which are as follows :

1. Staff

2. TrainingTypes

3. StaffTrainingMapper

 

Staff --> Id

TrainingTypes Id, Name

StaffTrainingMapper --> Staff[Id], Training[Id]

 

Attended : Count of staff[Id] in StaffTrainingMapper by Training[Id]

Missing : ?? not sure how to calculate that, Total staff - staff Attended or something.

 

I need a report of staff who attended (Staff with staff ID in StaffTrainingMapper) or missing training (Staff don't have STaff ID in StaffTrainingMapper) for diffrent training types. Output of the report will be something like :

New_Skitch_030416_100246_AM.jpg

2 REPLIES 2
austinsense
Impactful Individual
Impactful Individual

I think is the sort of code that you're looking for, AS MEASURES ...

 

Total Staff = COUNTROWS( Staff)
Attendance = DISTINCTCOUNT ( StaffTrainingMapper[StaffID])
Non-Attendance = [Total Staff] - [Attendance]
Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂

Hey Austin,

 

Thanks for the response.


One more question I have :
As the [StaffId] from [StaffTrainingMapper] is in relationship with the [Id] from [Staff] table and Training[Id] with [Training] table so it will be easy to get all the records from [StaffTrainingMapper] by [StaffId] and TrainingId (Which staff already takken the training), Though how we can get all the staff from [Staff] table who don't have coprresponding [StaffId] in [StaffTrainingMapper] (Staff who havn't taken the training yet).

 

Thanks in advance.

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.