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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
PrasadPatil
Regular Visitor

Row wise calculation

Hi Community..!!

please refer below sample data

Catergory    sales

A                     6

B                      4

C                      6

D                      4

Total                20     

 

I wanted to create a calculated column which includes logic like

=sale_value1(6) /total(20), sale_value2(4)/total(20), sale_value3(6)/total(20),sale_value4/total(20)

each sales row divide by grand total

Could anyone help me to do this calculation.

1 ACCEPTED SOLUTION
rsbin
Community Champion
Community Champion

@PrasadPatil ,

Create a Measure to calculate Total Sales:

TotalSales = CALCULATE( SUM( Sales1[Sales] ),
                       ALL( Sales1 ))  // Where "Sales1" is the name of your table

Then create a Calculated Column:

Sales_Percent = DIVIDE( [Sales], [TotalSales], 0 )

Use the column tools menu to format as percent or decimal, whichever your preference.

Trust this is what you are looking for.

Regards,

View solution in original post

2 REPLIES 2
rsbin
Community Champion
Community Champion

@PrasadPatil ,

Create a Measure to calculate Total Sales:

TotalSales = CALCULATE( SUM( Sales1[Sales] ),
                       ALL( Sales1 ))  // Where "Sales1" is the name of your table

Then create a Calculated Column:

Sales_Percent = DIVIDE( [Sales], [TotalSales], 0 )

Use the column tools menu to format as percent or decimal, whichever your preference.

Trust this is what you are looking for.

Regards,

Thanks for the Quick response @rsbin 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.