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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
xile015
New Member

DAX Help

Hi, I am completely new to Power BI and just learned DAX from youtube videos so please bear with me.

 

I am working on two tables:

 

TABLE1 has columns A, B, C and D with the employee number, full name, role (trainer/agent), and the class number.

 

TABLE2 is the dump file for their assessment, kinda like how google form records each entry/answer individually. It has columns A, B, and C with the question number, employee number, and true/false respectively. Column C populates true/false to determine if they got the answer correctly or not.

 

I was able to establish a relationship between these two tables using the employee number from each, and now I am working on a dashboard that looks like this:

 

Trainer-----Class--Headcount--CompletionRate--AverageScore--NumberOfPassed

Trainer A---A1--------xxx---------------xxx---------------xxx---------------xxx-------

Trainer A---A2--------xxx---------------xxx---------------xxx---------------xxx-------

Trainer B---B1--------xxx---------------xxx---------------xxx---------------xxx-------

Trainer C---C1--------xxx---------------xxx---------------xxx---------------xxx-------

 

 

Got the Trainers and Class columns into the dashboard by simply dragging them from TABLE1, I also have the headcount by using counta for the employee number from TABLE1. After dragging the counta measure into the dashboard, the they were automatically filtered by the Trainer and Class columns. All good!

 

My problem now is getting the CompletionRate column to populate correctly: I tried using distinctcount for the employee number under TABLE2 because I though it would count the number of distinct values since people who did not take the test will not appear. This way, I will have a count of the test takers, then I will divide with the counta measure for the Headcount.

 

Unfortunately when I drag the disctinctcount measure into the dashboard, it shows the exact same value for all Trainers and Classes so I know I am getting an incorrect value for the CompletionRate.

 

Can anybody help me with this please? Why is distinct count showing the same values for all rows and does not filter the Trainer/Class like the Headcount column does? Should I use a different function or do I have to add something else?

 

If you can help me get the formula for the succeeding columns as well, that would be greatly appreciated.

 

Thanks!

2 REPLIES 2
xile015
New Member

Hi, I am completely new to Power BI and just learned DAX from youtube videos so please bear with me.

 

I am working on two tables:

 

TABLE1 has columns A, B, C and D with the employee number, full name, role (trainer/agent), and the class number.

 

TABLE2 is the dump file for their assessment, kinda like how google form records each entry/answer individually. It has columns A, B, and C with the question number, employee number, and true/false respectively. Column C populates true/false to determine if they got the answer correctly or not.

 

I was able to establish a relationship between these two tables using the employee number from each, and now I am working on a dashboard that looks like this:

 

Trainer-----Class--Headcount--CompletionRate--AverageScore--NumberOfPassed

Trainer A---A1--------xxx---------------xxx---------------xxx---------------xxx-------

Trainer A---A2--------xxx---------------xxx---------------xxx---------------xxx-------

Trainer B---B1--------xxx---------------xxx---------------xxx---------------xxx-------

Trainer C---C1--------xxx---------------xxx---------------xxx---------------xxx-------

 

 

Got the Trainers and Class columns into the dashboard by simply dragging them from TABLE1, I also have the headcount by using counta for the employee number from TABLE1. After dragging the counta measure into the dashboard, the they were automatically filtered by the Trainer and Class columns. All good!

 

My problem now is getting the CompletionRate column to populate correctly: I tried using distinctcount for the employee number under TABLE2 because I though it would count the number of distinct values since people who did not take the test will not appear. This way, I will have a count of the test takers, then I will divide with the counta measure for the Headcount.

 

Unfortunately when I drag the disctinctcount measure into the dashboard, it shows the exact same value for all Trainers and Classes so I know I am getting an incorrect value for the CompletionRate.

 

Can anybody help me with this please? Why is distinct count showing the same values for all rows and does not filter the Trainer/Class like the Headcount column does? Should I use a different function or do I have to add something else?

 

If you can help me get the formula for the succeeding columns as well, that would be greatly appreciated.

 

Thanks!

v-juanli-msft
Community Support
Community Support

Hi @xile015

Could you share some example data of table1 and table2 and the expected result on the new visual?

 

Best Regards

Maggie

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors