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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors