cancel
Showing results for
Did you mean:
Frequent Visitor

## Percentage of grand total

Hi

I hope you can help me with this problem. I  have a table with four columns:

1. Customernumber
2. Customername
3. Sales
4. Sales shown as Percentage of Grand total

My table contains 50 customers (50 rows). Now I would like to filter the Customernames by using advanced filter to only select the 10 customers with the higest sales. This is fine, but when I do this, the Sales shown as percentage of Grand Total, is based on the Grand Total of only the 10 customers. I need to show it as a percentage of the Grand Total of the 50 customers.

Is this possible?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

## Re: Percentage of grand total

@Agnethe

Hi, try with this measure:

```% of Grand Total =
DIVIDE (
SUM ( Table1[Sales] ),
CALCULATE ( SUM ( 'Table1'[Sales] ), ALL ( 'Table1'[Customer Name] ) )
)```

Regards

Victor

Lima - Peru

Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

4 REPLIES 4
Super Contributor

## Re: Percentage of grand total

@Agnethe

Hi, try with this measure:

```% of Grand Total =
DIVIDE (
SUM ( Table1[Sales] ),
CALCULATE ( SUM ( 'Table1'[Sales] ), ALL ( 'Table1'[Customer Name] ) )
)```

Regards

Victor

Lima - Peru

Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Super Contributor

## Re: Percentage of grand total

Hi @Agnethe,

As I test, the solution @Vvelarde posted is right. Please try and check if it works fine. Please mark the right reply as answer if you have resolved your issue, so more people will benefit from here. Please feel free to ask if your problem still stay there.

Best Regards,
Angelia

Frequent Visitor

## Re: Percentage of grand total

Thank you very much, exactly what I was looking for.

Regards,

Agnethe

Member

## Re: Percentage of grand total

Hi...I have the same problem but also last year:

I need the same but using previousYear function...I did this but it doesnt work:

Any idea how to fix it?

Announcements

#### Community Highlights

Find out what's new in the Power BI Community!

#### Power Platform Summit North America

Register by September 5 to save \$200

#### Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

#### Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 364 members 3,949 guests
Recent signins: