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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
akhaliq7
Post Prodigy
Post Prodigy

Using two related columns within sumx causes error

I have a sumx function that first gets a value

if fact[date1] > related(table2'[date2]), 1, 0

 

I then use the filter function after sumx to filter by the fact table

 

Upto here the code runs fine. its when I try to filter by another 3rd table it causes an error

 

RELATED('table3[column1]) <> "Value"

 

This causes an error

 

FULL CODE BELOW:

 

CALCULATE (
    SUMX (
        'FACT TABLE',
        IF ( 
            [date1] > RELATED('table2'[date2]),
                1,
                0
        )
    ),
    'FACT TABLE'[Column2] <> "VALUE"
    RELATED('table3'[column3]) <> "VALUE"
)
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

I don't think you need RELATED for that, you can simply use 'table3'[column3] <> "value"

View solution in original post

3 REPLIES 3
akhaliq7
Post Prodigy
Post Prodigy

ok thanks for that never knew if its in the filter function you don't need to use related. the filter function must just automatically detect the relationship. anyways thanks for that

tamerj1
Super User
Super User

Hi @akhaliq7 

please try

=
COUNTROWS (
FILTER (
'FACT TABLE',
'FACT TABLE'[date1] > RELATED ( 'table2'[date2] )
&& 'FACT TABLE'[Column2] <> "VALUE"
&& RELATED ( 'table3'[column3] ) <> "VALUE"
)
)

johnt75
Super User
Super User

I don't think you need RELATED for that, you can simply use 'table3'[column3] <> "value"

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.