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
Anonymous
Not applicable

DAX for comparing 2 columns (in different tables) to get list of missing values(text)

Hi all,

 

Newbie here needing help with DAX for comparing 2 columns (in different tables) to get list of missing values(text). Can anyone point me in the right direction? Thanks in advance!

 

For example, 

 

Table1_CustomerList

CustID

101

102

103

104

105

 

Table2_OrderList

CustID     OrderID

102          P312

103          P451

105          P231

 

Output Required:

CustID (with no orders)

101

104

1 ACCEPTED SOLUTION

Hi @Anonymous ,

You could try the formula below.

Table 2 = CALCULATETABLE('Table',NOT('Table'[CustID] in VALUES('Table 1'[CustID])))

1.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
AlB
Community Champion
Community Champion

Hi @Anonymous

Try this (assumes no relationships between the 2 tables)

1. Place Table1[CustID] in the rows of a table visual

2. Create this measure:

ShowMeasure =
VAR CurrentID = SELECTEDVALUE ( Table1[CustID] )
RETURN
    IF (
        CALCULATE ( COUNT ( Table2[CustID] ), Table2[CustID] = CurrentID ) + 0 = 0,
        1,
        0
    )

3. Place [ShowMeasure] as a visual filter  and select to show when value is 1

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

 

Anonymous
Not applicable

@AlB 

 

Thanks!

 

Would we be able to get it as a data table instead of a table visual so that we can use the list of CustID without orders for some other DAX measures?

Hi @Anonymous ,

You could try the formula below.

Table 2 = CALCULATETABLE('Table',NOT('Table'[CustID] in VALUES('Table 1'[CustID])))

1.PNG

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

Can you find the missing values based on two critiera? First, it needs to match with the date, then match with a vaue?

 

Derek

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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