Forum Discussion
Market Share Calculation - Filtered value line chart challenges (DAX)
Hi Anonymous,
What measures did you use? How did you calculate the percentage values displayed in Matrix and line chart?
Regards,
Yuliana Gu
v-yulgu-msft, Thanks for your help! This really isn't my area of expertise, so excuse the laughable query (our developer is on leave for the week so I'm trying to self-serve).
The market share value is derrived by dividing two measures. Lets call them [sales] and [all sales] and presenting the value as a %
For [sales], it's just the sum of units
For [all sales] its the sum of all units, all brands (All Sales = CALCULATE(SUM(Sheet1[Units]),ALL(Sheet1[Brand]))- I'm aware that this is the measure which needs fixing. I need this value to be the sum of all sales in a specific month (the same number for all brands) but also have it adapt to both price point filters and location filters. I've tried a bunch of 'all' and 'all except' inclusions in my calculation but I'm yet to get a result that works...
Getting the value to work in the table / matrix is no problem. I just can't seem to get it to chart in a line chart (when I add a location or price point filter) As soon as I select a brand to highligh the individual trend I get 100% values for each month.