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
M_Donovan
Frequent Visitor

DAX to count when no value is related

Hi all

 

I am struggling to get my head around something that i am sure is simple in Excel power pivot data model.

 

Table A has X_Id 

Table B has X_Id and Y_id

not all items from A are in B but all items in B (X_id) are in A (1 to many). This has been set up as a relationship 

 

I want to get a measure that will give me counts for all the X_IDs in Table A that are not in Table B i.e dont have a Y_id.

 

hopes that makes sense and thanks in advance

 

Mike

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try

Missing from B =
COUNTROWS ( EXCEPT ( VALUES ( 'TableA'[X id] ), VALUES ( 'TableB'[X id] ) ) )

View solution in original post

2 REPLIES 2
M_Donovan
Frequent Visitor

Johnt,

Seems do do exactly what i wanted to. 

 

Thanks

 

Mike

johnt75
Super User
Super User

Try

Missing from B =
COUNTROWS ( EXCEPT ( VALUES ( 'TableA'[X id] ), VALUES ( 'TableB'[X id] ) ) )

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.