cancel
Showing results for
Did you mean:
Highlighted
Regular Visitor

## Have Market Share equal 100% with every type of Date Drill Down

I created a Market Share calculation as follows:

`Market Share = divide(CALCULATE(SUM(Sheet1[Number of Sales])), Calculate(sum(Sheet1[Number of Sales]), all(Sheet1)))`

Which creates the following if I put the 'Market Share' formula into Values in the stacked bar chart visual:

However, I'm interested in percent of Market Share by each drill down of time.

I want each date axis to have 100 percent market share.

Each column would add up to 100 percent. This is what each year would look like:

Then this is what Market Share for Quarter would look like:

I want to be able to tell market share for a given month, year or quarter without hard coding.

The question I cannot asnwer:

• What percent of market share did Adventure Works have in October 2013?

• Then quickly answer, what percent of market share did Adventure Works have in October 2015?

Where each Market Share measure is a factor of 100%.

Right now when I run the query above, I'll get .002% for October 2013  and .0005% for October 2015 instead of 50% and 14% for each month of interest.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team

## Re: Have Market Share equal 100% with every type of Date Drill Down

Hi @jpf5046,

For your requirement that "want each date axis to have 100 percent market share", you should use 100% stacked column chart rather than stacked column chart. And there is no need to create a measure to calculate the percentage value. You only need to drag Sheet1[Number of Sales] into value section, add [Date] into x-axis section and add [Product] into legend section.

For your questions, "What percent of market share did Adventure Works have in October 2013", please see below examples in my test.

Drill down to Year-Quarter level, we can see that the percentage value which is highlighted in red,

85.71%=180/(180+30)

Here, 180 means the total sales of SoftWare in 2016 Quarter1, including Jan, Feb and March. 30 represents the total sales of HardWare in 2016 Quarter1.

Drill down to Year-Month level.

44.44%=16/(16+20)

Here, 16 means the total sale of HardWare in 2016 September

From above screenshot you provided, I cannot understand what did you mean "I'll get .002% for October 2013  and .0005% for October 2015 instead of 50% and 14% for each month of interest". For further analysis, please share your sample data and elaborate your scenario with actual screenshot.

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team

## Re: Have Market Share equal 100% with every type of Date Drill Down

Hi @jpf5046,

For your requirement that "want each date axis to have 100 percent market share", you should use 100% stacked column chart rather than stacked column chart. And there is no need to create a measure to calculate the percentage value. You only need to drag Sheet1[Number of Sales] into value section, add [Date] into x-axis section and add [Product] into legend section.

For your questions, "What percent of market share did Adventure Works have in October 2013", please see below examples in my test.

Drill down to Year-Quarter level, we can see that the percentage value which is highlighted in red,

85.71%=180/(180+30)

Here, 180 means the total sales of SoftWare in 2016 Quarter1, including Jan, Feb and March. 30 represents the total sales of HardWare in 2016 Quarter1.

Drill down to Year-Month level.

44.44%=16/(16+20)

Here, 16 means the total sale of HardWare in 2016 September

From above screenshot you provided, I cannot understand what did you mean "I'll get .002% for October 2013  and .0005% for October 2015 instead of 50% and 14% for each month of interest". For further analysis, please share your sample data and elaborate your scenario with actual screenshot.

Regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

## Re: Have Market Share equal 100% with every type of Date Drill Down

This is exactly what I needed. It's one of the base visuals! oh man!

Thank you @v-yulgu-msft