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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
WLFRD
Helper III
Helper III

% of total sales per dealer

Hello,

Perhaps someone can assist me with the following. I would like to display the percentage of total sales per dealer code in a third column. The basic data is in the first two columns.

 

Capture21.JPG

 

Dealer_code Net_Sales
10  0
10 6.64
10 15.04
10 15.87
10 57.34
10 58.49
10 62.55
10 88.34
10 90.05
7001 572.72
7001 573.18
7001 573.97
7001 578.75
7001 580.06
7001 591.21
7001 599.72
7001 606.64
7001 610.82
7001 619.3
7001 634.81
7001 636.77
33220 769.36
33220 784.77
33220 808.94
33220 817.86
33220 836.56
33220 860.68
33220 880.4
35452 106.21
35452 107.13
35452 107.76
35452 107.81
35452 107.99

 

Total Net Sales per dealer code:

 

Capture22.JPG

 

Dealer_code Net_Sales
10 394.32
7001 7177.95
33220 5758.57
35452 536.9

 

Percentage of total sales should look like this:

 

Capture23.JPG

 

Dealer_code Net_Sales Percentage of total sales
10 394.32 2.84
7001 7177.95 51.76
33220 5758.57 41.52
35452 536.9 3.87

 

Can someone help me out with this?

 

Thanks in advance.

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @WLFRD 

You can create 2 Dax measures :
1. For Net sales :

Net_sales_% = [net_sales_]/CALCULATE([net_sales_],all('Table'[Dealer_code]))
2. For percent from total:
Net_sales_% = [net_sales_]/CALCULATE([net_sales_],all('Table'[Dealer_code]))
Ritaf1983_0-1696822770261.png

You can download the file with an example and follow my steps from This link 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

1 REPLY 1
Ritaf1983
Super User
Super User

Hi @WLFRD 

You can create 2 Dax measures :
1. For Net sales :

Net_sales_% = [net_sales_]/CALCULATE([net_sales_],all('Table'[Dealer_code]))
2. For percent from total:
Net_sales_% = [net_sales_]/CALCULATE([net_sales_],all('Table'[Dealer_code]))
Ritaf1983_0-1696822770261.png

You can download the file with an example and follow my steps from This link 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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