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
jakseadog
New Member

Value from related table

Hello,

 

I'm learning DAX and I'm stuck with finding one solution. Let's consider following easy example:

 

I have 2 tables: one called Statistics and one called Players (many to one relationship).

 

Statistics:

 

PlayerIdPoints
1

30

 

Players:

 

PlayerIdName
1John Doe

 

30 points is the highest value - I can get it using MAX function. I can also get PlayerId who scored this max amount of points. But how can I get his Name - John Doe?

To sum up - I would like to know how to write DAX query, which would return name of player, who scored most points.

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi, @jakseadog 

Please correct me if I wrongly understood your question.

 

Please try to create the below measure.

 

measure = calculate (selectedvalue(Players[name]), [PlayerID] = yourmeasurethat indicatesMAXscorePlayerID)

 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
amitchandak
Super User
Super User

@jakseadog , In Statistics, You can create new column

Player Name= related(Players[Name])

 


refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for response. But what if I would like to keep my model as star schema and not replicate player name in Statistics, but keep it only in Players table? Is there any way to show this value as a measure for example?

@jakseadog , As they are joined you can always use the player name with Fact Statistics in table visual

or you can use Max(Players[Name]) as measure if needed

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
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!

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.