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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX - Return just one column from a related table

Hi,

 

I want to add an additional column to a student table (EOY Target). It is currently stored in another table, with lots of other data and fields.

 

I've written the following dax for the column. The relationship between the table is 1:M Pupil:Attainment. I know the below will effectively return a whole row of data based on the filter.

 

How do I then amend the below to just pull the column (Result) which has the actual data I want?

 

EOYReadingTarget = FILTER(RELATEDTABLE(TR_Pupil_Attainment), TR_Pupil_Attainment[AspectName] = "Target EOY Reading TA")
 
TIA
1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

Is there a particular reason you need to add the column to the table? If there is a relationship, you can build visuals with fields from both tables directly





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Yes, I'm trying to create a matrix table, with the target as colum and then values held in another table as the rows.

 

The pupil table is the one side of both relationships. 

 

Whilst writing the above, I thought about making one of the relationships multi directional and this has resolved my issue.


Thanks for making me think. 🙂

You shouldn't need to make the relationship multi directional. Just use the fields from the dimension table to establish the filter context and add fileds from the many table & measures for value fields





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






PaulDBrown
Community Champion
Community Champion

Is there a particular reason you need to add the column to the table? If there is a relationship, you can build visuals with fields from both tables directly





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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