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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.