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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Syndicate_Admin
Administrator
Administrator

Total % over rows.

I have a sales table with the company, date, invoice number, product and amount.

I would like to know the formulas for the columns Amount2 and amount3 . Amount 2 is the % of each product on the total sales (what would be in excel the % of the tpotal) and amount3 is % of each product on the total sales of each company (which would be in excel the % of the main total with baase the company)

product company Importe1 Import2 Import3
EMP1 TO 7,668.00 € 33,75% 55,20%
B 2,306.52 € 10,15% 16,60%
C 2,677.46 € 11,79% 19,27%
D 1,240.00 € 5.46% 8.93%
Total EMP1 13,891.98 € 61,15% 100.00%
EMP2 TO 2,364.00 € 10,41% 26,78%
B 2,965.68 € 13,05% 33,60%
C 2,401.36 € 10,57% 27,20%
D 1,096.00 € 4.82% 12.42%
Total EMP2 8,827.04 € 38.85% 100.00%
General total 22,719.02 € 100.00%

Thank you

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @teixidor ,

 

Here's my solution.

1.Importe2 is to put the Imprte1 field into the value, and then select show value as 'Percent of grand total'.

vstephenmsft_0-1637821415062.png

Tips: You can rename the field.

vstephenmsft_1-1637821483610.png

 

2.Importe3 is measure, it is as follows.

Importe3 = var _total=CALCULATE(SUM('Table'[Importe1]),ALLEXCEPT('Table','Table'[empresa]))
return DIVIDE(SUM('Table'[Importe1]),_total)

vstephenmsft_2-1637821540362.png

 

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

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

1 REPLY 1
v-stephen-msft
Community Support
Community Support

Hi @teixidor ,

 

Here's my solution.

1.Importe2 is to put the Imprte1 field into the value, and then select show value as 'Percent of grand total'.

vstephenmsft_0-1637821415062.png

Tips: You can rename the field.

vstephenmsft_1-1637821483610.png

 

2.Importe3 is measure, it is as follows.

Importe3 = var _total=CALCULATE(SUM('Table'[Importe1]),ALLEXCEPT('Table','Table'[empresa]))
return DIVIDE(SUM('Table'[Importe1]),_total)

vstephenmsft_2-1637821540362.png

 

You can check more details from the attachment.

 

 

Best Regards,

Stephen Tao

 

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

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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