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
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
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.