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

Help with filtering Not and Not with ANd

I need a Not &  Not with And filter

In this example I have 3 tables related to bicycles. Unit, UnitOption and Option.

Unit is related to UnitOption with UnitKey,

UnitOpion is related to Option with OptionKey.

In the first case the result set needs to be all of the units that do "NOT" have Option 12A - Front basket .  The result set would be Unit 951.  In the second case  I want to see all the units that do "NOT" have option 12A Front Basket "AND" do not have option 35B Horn. The result set would then be Units 456 and 925. Neither of these units has both option 12A Front Basket and 35B Horn.  I need  to be able to filter "Not" and  "Not" with "And" . Your help is much appreciated.

 

UnitTable

 

UnitOptionTable

 

 

OptionTable

UnitKey

 

UnitKey

OptionKey

 

OptionTable

OptionName

123

 

123

35B

 

35B

Horn

456

 

123

12A

 

12A

Front Basket

789

 

123

51G

 

51G

Saddle Basket

951

 

456

66F

 

66F

Head Light

  

456

12A

 

12A

Front Basket

  

456

77X

 

77X

Tail Light

  

789

35B

 

35B

Horn

  

789

21G

 

21G

Sticker PKG

  

789

12A

 

12A

Front Basket

  

951

89K

 

89K

Grip Streamers

  

951

5FR

 

5FR

Fork Springs

  

951

53F

 

53F

Leather Seat

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Solved the first one with a variation of my Not in Common Quick Measure. https://community.powerbi.com/t5/Quick-Measures-Gallery/Not-In-Common/m-p/388273

 

NotInCommon = 
VAR tableA = ALL(Units)
VAR tableB = CALCULATETABLE(Units)
VAR results = EXCEPT(tableA,tableB)
RETURN CONCATENATEX(results,[UnitKey],",")

See attached, Page 8. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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