cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors