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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Jerid421
Helper II
Helper II

Return Max Value on One Side of Relationship

I am trying to populate a calculated column on the one side (dimState) of a relationship with the MAX() of all the values associated to those records on the many side (factJobOpenings) of the relationship.  

 

I have this so far but it is returning the MAX of ALL the values in the fact table column ([AvgStatePlacementDays], not for each of the States:

20YrAvgDaystoPlace = CALCULATE(MAX(factJobOpenings[AvgStatePlacementDays]), FILTER(factJobOpenings,factJobOpenings[StateID] = RELATED(dimState[StateID])))
 
 
1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

@Jerid421 if the calculated column is in DimState table,try this

MAXX(RELATEDTABLE(factJobOpenings),factJobOpenings[AvgStatePlacementDays])

View solution in original post

4 REPLIES 4
wdx223_Daniel
Super User
Super User

@Jerid421 if the calculated column is in DimState table,try this

MAXX(RELATEDTABLE(factJobOpenings),factJobOpenings[AvgStatePlacementDays])

This worked perfectly.  I tried MAXX() (becuase I thought I needed and iterator) but I must not have used it correctly.  Thanks!

AlB
Community Champion
Community Champion

Hi @Jerid421 

I'm not sure what you are trying to do with the RELATED( ). Try:

0YrAvgDaystoPlace = CALCULATE( MAX( factJobOpenings[AvgStatePlacementDays] ) )

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

I changed the title of the post as it incorrectly said "Many" instead of "One".  That might explain what I'm trying yo do with the Related() function.  Sorry!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.