Forum Discussion
rwelsh11
8 years agoFrequent 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...
- 8 years ago
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? :smileyhappy:
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
v-ljerr-msft
8 years agoMicrosoft 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? :smileyhappy:
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
rwelsh11
8 years agoFrequent Visitor
This is great thanks!