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 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:
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.
Solved! Go to Solution.
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
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
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |