Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a table where there are multiple customer records Table 1 and a table of customers I want to exclude from my results Table2. Tables 1 & 2 are joined in my data model: many to one.
I want a listing (no duplicates) of customers from Table 1 not in Table 2
The DAX I have written to achieve this is:
DEFINE
VAR MyDetailTbl =
CALCULATETABLE(
SELECTCOLUMNS('Table 1'
,"Customer Number", 'Table 1'[Customer No]
,"isDup", RELATED(Table2[Customer No])
)
)
VAR MySummaryTbl =
GROUPBY(MyDetailTbl, [Customer Number],[isDup])
EVALUATE
SELECTCOLUMNS(FILTER(MySummaryTbl, ISBLANK([isDup])),"Customer No", [Customer Number])
This seems over complicated. Is there a more straightforward way to achieve this?
Solved! Go to Solution.
Hi @Sullyball2a ,
Yes, you can rewrite it as follows :
except( distinct('Table 1'[Customer No]), distinct( 'MyDetailTbl'[Customer Number]))
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Thank you - I knew there had to be a more simple way. I wasn't aware of the EXCEPT() or DISTINCT() functions. I was aware of VALUES() and I tried it with that instead of DISTINCT() and it worked too.
Thank you - I knew there had to be a more simple way. I wasn't aware of the EXCEPT() or DISTINCT() functions. I was aware of VALUES() and I tried it with that instead of DISTINCT() and it worked too.
Hi @Sullyball2a ,
Yes, you can rewrite it as follows :
except( distinct('Table 1'[Customer No]), distinct( 'MyDetailTbl'[Customer Number]))
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.