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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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