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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
SamOvermars
Helper I
Helper I

How to get a count of customer whose not available in another table

Hello,

I have two list of customer available in two different tables. How can I get the count of customer that are available in Table1 but not available in Table2?

Example below

Table1Table2
CustomerCusomter
Cus1Cus1
Cus2Cus1
Cus3Cus12
Cus4Cus12
Cus5 
Cus6 
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@SamOvermars 

pls try this

Measure = 
VAR tbl=ADDCOLUMNS('Table 1',"check",LOOKUPVALUE(Table2[Customer],Table2[Customer],'Table 1'[Customer]))
return COUNTROWS(FILTER(tbl,[check]=""))

1.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @SamOvermars ,

 

Please try this measure:

Measure = COUNTROWS(DISTINCT(EXCEPT('Table1','Table2')))

vcgaomsft_0-1657604475978.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula in Table1

Available in Table2 = LOOKUPVALUE(Table2[Customer],Table2[Customer],Table1[Customer])

Write this measure

Measure = calculate(countrows(Table1),Table1[Available in Table2]=BLANK())

Hope this helps.

Untitled.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@SamOvermars 

pls try this

Measure = 
VAR tbl=ADDCOLUMNS('Table 1',"check",LOOKUPVALUE(Table2[Customer],Table2[Customer],'Table 1'[Customer]))
return COUNTROWS(FILTER(tbl,[check]=""))

1.PNG

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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