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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
KaterineCAA
Frequent Visitor

Calculate sum of column in query editor

I have the following table in the query editor of PowerBI.

I would like to either :

- Calculate the sum of "Nombre de répondants" and add it in a new column (it would be the same value for every line) or

- Calculate the proportion of "Nombre de répondants"

 

As a result, I would have one of the two new columns in the second image. (My 249 will varie in the future)

I would prefer doing it in the query editor.

 

Thank you!

 

Actual Table :

 

Actual table - v2.png

 

Wanted table :

 

wanted table - v2.png

 

 

1 ACCEPTED SOLUTION
v-xjiin-msft
Solution Sage
Solution Sage

@KaterineCAA

 

To achieve your requirement, you can refer to following steps:

 

  1. In Edit Queries, go to Add Column and add a Custom Column.
  2. Use Power Query expression like: List.Sum(#"Changed Type"[Nombre de répondants]) to get the sum of Nombre de répondants.
  3. Then for Proportion, you can simply use expression like: [Nombre de répondants]/[ Nombre de répondants Total]

 

Thanks,
Xi Jin.

View solution in original post

3 REPLIES 3
v-xjiin-msft
Solution Sage
Solution Sage

@KaterineCAA

 

To achieve your requirement, you can refer to following steps:

 

  1. In Edit Queries, go to Add Column and add a Custom Column.
  2. Use Power Query expression like: List.Sum(#"Changed Type"[Nombre de répondants]) to get the sum of Nombre de répondants.
  3. Then for Proportion, you can simply use expression like: [Nombre de répondants]/[ Nombre de répondants Total]

 

Thanks,
Xi Jin.

Hi, is this solution still current, i cannot get it to work

Thank you so much!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors