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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Ad550
Frequent Visitor

Create a PowerQuery Column That References Entire Table

I’m trying to create a new column that references each rows values compared to that of the entire table in power query.  For example, I have a table of students, their study time (broken down into groups or less than 3 hours, 3-6 hours and > 6 hours) and their grades on an exam (each row is a student).   I’m trying to create a new column that renders the predicted test grade based solely off of their study time value (so if their study time is less than 3 hours for example, the value of the new column for that row would be the average exam score over the whole table for all rows that had a study time of less than 3 hours).  How can I create a new column that achieves this and filters the entire table based on each rows value?

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi  @Ad550 ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

yingyinr_0-1665136299223.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regard

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi  @Ad550 ,

I created a sample pbix file(see attachment) for you, please check whether that is what you want.

yingyinr_0-1665136299223.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regard

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hnguy71
Memorable Member
Memorable Member

@Ad550 ,

 

I know your question is to build it in power query but I think this would be more efficient as a measure. Does it have to be in power query?



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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