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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
FilipFireFlyBI
Resolver I
Resolver I

sum rows with a condition

Hi all, See below a preview of my tabel. There are two categories (A and B), the sum of values is 34. Type,Value A, 20 A, 10 B, 4 Total, 34 I want to add Type B to Type A, in the weights of the values of the Types (so row 1 Type A = 20/30 and row 2 Type A = 10/30). So this is what I need: Type,Value A, 22.67 B, 11.33 Total, 34 As you can see total does not change (Total is 34 before and 34 after) I have already tried both Power Query (Grouping by etc.) and different DAX, but no answer. Any ideas? Thanks!
1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @FilipFireFlyBI ,

 

I’m confused about your description. How do you calculate the values of 22.67 for A and 11.33 for B?  If you multiply the value of A by 34 and divide by 30, then how would your B equal 11.33?  is it correct?  The following is my sample data. Can you please share more details and post the accurate output. Then we can help you as soon as possible.

1.png

Best Regards,

Xue Ding 

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

 

Best Regards,
Xue Ding
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

3 REPLIES 3
vivran22
Community Champion
Community Champion

@FilipFireFlyBI 

 

Hi,

 

Please see the solution in the pbix file here

 

Rgds,

Vivek

 

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

v-xuding-msft
Community Support
Community Support

Hi @FilipFireFlyBI ,

 

I’m confused about your description. How do you calculate the values of 22.67 for A and 11.33 for B?  If you multiply the value of A by 34 and divide by 30, then how would your B equal 11.33?  is it correct?  The following is my sample data. Can you please share more details and post the accurate output. Then we can help you as soon as possible.

1.png

Best Regards,

Xue Ding 

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

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

Has this been resolved?

Rgds,
Vivek

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors