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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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