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
Pikachu-Power
Impactful Individual
Impactful Individual

BLANK fields after left join doesnt exist

Hello all,

 

in SQL i can simply do following query

 

SELECT * FROM Table1 A

LEFT JOIN (SELECT * FROM Table2 WHERE origin = 'ANALYSE') B

ON A.PK1 = B.PK2

WHERE B.PK2 IS NULL

 

In DAX:

Measure1 =
CALCULATE(DISTINCTCOUNT(Table1[PK1]),
                    Table2[origin] = "ANALYSE",
                    Table2[PK2] = BLANK())
 
doenst work because these BLANK() fields doenst exist. Table1 <--> Table2 filters both sides. Does someone see where the mistake is?
 
When I say not equal BLANK() it works and I get the right values: 
 
Measure2 =
CALCULATE(DISTINCTCOUNT(Table1[PK1]),
                    Table2[origin] = "ANALYSE",
                    Table2[PK2] <> BLANK())
 
Must be something simple that i oversee.
 
Many thanks.
 

  

1 ACCEPTED SOLUTION
Pikachu-Power
Impactful Individual
Impactful Individual

I found a way using NATURALLEFTOUTERJOIN(Table1, Table2) and work on that with a measure. A simple relationship seems not to generate a LEFT JOIN behaviour like in SQL. Or does someone knows a way to do it without creating a new NATURALLEFTOUTERJOIN Table?

View solution in original post

1 REPLY 1
Pikachu-Power
Impactful Individual
Impactful Individual

I found a way using NATURALLEFTOUTERJOIN(Table1, Table2) and work on that with a measure. A simple relationship seems not to generate a LEFT JOIN behaviour like in SQL. Or does someone knows a way to do it without creating a new NATURALLEFTOUTERJOIN Table?

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