Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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??
Solved! Go to Solution.
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? ![]()
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
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? ![]()
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!
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!