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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
rwelsh11
Frequent Visitor

Calculating Market Share Over Time

I am trying to display the marketshare for various accounts over time and am struggling with which DAX formula to use. I have a simple table (Week Ending Date, Account Name, Units Sold). I would like to display the marketshare for each account over time (year, month, week etc.). I would like to display this information with a line graph. Everything I try either calculates the marketshare based on the total period (i.e. the % of one weeks' sales for one account out of the total sales of all accounts across all time) or it shows all accounts at 100% for each week ending date. Can anyone help me??

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @rwelsh11,

 

Could you try using the formula below to create a new measure to calculate marketshare, then show the measure as Values, "Week Ending Date" as Axis, and "Account Name" as Legend on the Line Chart visual to see if it works in your scenario? Smiley Happy

measure =
DIVIDE (
    SUM ( 'Table1'[Week End Date] ),
    CALCULATE ( SUM ( 'Table1'[Week End Date] ), ALL ( 'Table1'[Account] ) )
)

Remark: replace 'Table1' with your real table name.

 

Regards

View solution in original post

4 REPLIES 4
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @rwelsh11,

 

Could you try using the formula below to create a new measure to calculate marketshare, then show the measure as Values, "Week Ending Date" as Axis, and "Account Name" as Legend on the Line Chart visual to see if it works in your scenario? Smiley Happy

measure =
DIVIDE (
    SUM ( 'Table1'[Week End Date] ),
    CALCULATE ( SUM ( 'Table1'[Week End Date] ), ALL ( 'Table1'[Account] ) )
)

Remark: replace 'Table1' with your real table name.

 

Regards

This is great thanks!

rwelsh11
Frequent Visitor

I am trying to calculate the market share for a variety of accounts over several years and am struggling with the DAX. I have a very simple table (Week End Date, Account, Units Sold) and I am trying to graph the relative marketshare for each account with a line graph over time (week ending dates run 2014 - 2017). My challenge is that I either get the % of one weeks' sales at one account out of the total sales for all accounts across the entire period  or I see every data point at 100%. I basically want to calculate the marketshare for each account during a given week (totalling 100% for each week) and then graph that across all the weeks in a line graph. Please help!!

Hi,

 

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.

Top Solution Authors
Top Kudoed Authors