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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tfraletti
Helper I
Helper I

RELATED and "The column either doesn't exist or doesn't have a relationship to any..."

Hello everyone, hope you're fine today!

 

I have 2 tables with a many to many active relationship and want to count the number of row in table A that doesn't have match on table B.

 

On other posts from Power Bi Community, got the following solution: IF(ISBLANK(RELATED('ZMMQ3020'[@ SKU Center Key]));FALSE();TRUE())

 

But i received the following message:  The column 'ZMMQ3020[@ SKU Center Key]' either doesn't exist or doesn't have a relationship to any table available in the current context.

 

But they have an active relationship. Any idea why this is happening and any other way to make it work?

 

Obs.: Use merge in Power Query isnt an option, since it grows my refresh time to more than 30 min because of the size of my data. Thanks in advance.

4 REPLIES 4
MarcoPessina
Resolver IV
Resolver IV

Hi @tfraletti ,

you can also use this measure:

HasMatch_Measure =
IF(
CALCULATE(COUNT(ZMMQ3020[@ SKU Center Key]), CROSSFILTER(Table1[@ SKU Center Key], ZMMQ3020[@ SKU Center Key] ,Both))>0,
TRUE(),
FALSE()
)
 
Hope it helps.
Cheers,
Marco

Hi Marco,
It almost worked...its strange. I needed to use it in two different tables that connect with my main one (main one is called ZMMQ3021). In one of them (ZMMQ3020), it connected properly and i could see on the new column from ZMMQ3021 table that values for true and falses exist, and also properly filter them. But when it comes to the other table (which i call ME5A), i also can see true and falses in the table, but when it comes to filter, i only see true values, even if i only use this column as the filter of my visual. Any ideia why this is happening?
jstorm
Resolver III
Resolver III

Try this:

COUNTROWS(
    FILTER(
        'Table A',
        NOT CONTAINS(
            'Table A', [SKU Center Key],
            'ZMMQ3020', [SKU Center Key]
        )
    )
)

Hi, it didn't work because PBI ask me values for the CONTAINS function.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.