Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |