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
Anonymous
Not applicable

Understanding why RELATED doesn't work

Hi all, 

 

Hoping not just for the answer but an explaination if possible:

 

I've always had an issue fully understanding RELATED, the function requires Row-context (makes sense), however, I've tried to impliment the following VAR and i'm returning the following error:

 

ADDCOLUMNS(SUMMARIZE(fact_opportunity_line_ledger,fact_opportunity_line_ledger[Opportunity Id]),
"TEST", related(Opportunity[Opportunity Id]))

The column 'Opportunity[Opportunity Id]' either doesn't exist or doesn't have a relationship to any table available in the current context.
 

My understanding here is that Summarize creates a row context, so in theory, this should work... is it because of the following:

 

1) Summarize isn't an iterator and therefore requires an iterator? 

2) is Summarize not row context like I've been thought to believe?

 

Essentially I want to reference a field in a 1:n relationship in order to create a calculation within a measure. However, I need row context at the op level so that the calculation is correct, and not incorrectly aggreating based on the sum of said column. I

 

Thanks for reading!

 

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

Your guess makes sense; to my understanding, SUMMARIZE() isn't an typical iterator which provides row-by-row row context; it produces both a row context and a filter context after summarizing. 

SUMMARIZE – DAX Guide

 

You can tell the nuance when making comparison with a typical iterator like SUMX() SUMX - DAX Guide



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

1 REPLY 1
ThxAlot
Super User
Super User

Your guess makes sense; to my understanding, SUMMARIZE() isn't an typical iterator which provides row-by-row row context; it produces both a row context and a filter context after summarizing. 

SUMMARIZE – DAX Guide

 

You can tell the nuance when making comparison with a typical iterator like SUMX() SUMX - DAX Guide



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.