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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

measure to count from another table (not relationed tables) - very challenging

Hi !

I have two tables and i can´t relation them because they are many to many.

 

Table 1

 

Course Name | Goal

Law                 | 2

Medicine        | 3

 

Table 2

 

Law

Law

Law

Medicine

Law

Medicine

Medicine

 

What is my expected result (Count if)


Course Name | Goal | Count from Table 2

Law                 | 2      |           4

Medicine        | 3      |            3

 

How can i Creat a measure for this ? I want to show as a Matrix in my power bi, like above..

 

Many thanks guys!!

 

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@Anonymous 

Create two measures:

1) Sum of Goal = SUM(Table 1 [Goal])

 

2) count of course = CALCULATE(COUNT(Table 2 [Course]), TREATAS(VALUES(Table 1 [Course]), Table 2 [Course]))

 

create the matrix with the rows from Table 1 [Course] as rows and add both measures.

 

result.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

1 REPLY 1
PaulDBrown
Community Champion
Community Champion

@Anonymous 

Create two measures:

1) Sum of Goal = SUM(Table 1 [Goal])

 

2) count of course = CALCULATE(COUNT(Table 2 [Course]), TREATAS(VALUES(Table 1 [Course]), Table 2 [Course]))

 

create the matrix with the rows from Table 1 [Course] as rows and add both measures.

 

result.JPG

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors