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 calculate the % of Total by Day.
In the screen capture below, imagine that I have 3 types of fruit. Apples, Oranges, and Lemons. I am trying to figure out how to calculate the percentage of sales for a specific day.
For instance, when you look at the left-most column I would like to label this as:
Lemons (Red) 60%
Oranges (Black) 8%
Apples (Blue) 32%
I only expect to show the values.
Thanks in advance.
Solved! Go to Solution.
Hi @irnm8dn,
According to your description above, you want to show percentage(not percentage of grand total) as label on stacked column chart like below, but not like the 100% stacked column chart, right?
Currently, there is no option to show percentage(not percentage of grand total) as label on stacked column chart. You can add it as an idea on Power BI Ideas forum to improve Power BI on this feature.
An alternative solution is creating a new measure to calculate the percentage, and then show it as tooltips on the chart.
Measure = DIVIDE ( SUM ( 'Fruit Sample Data Set'[ Units Sold ] ), CALCULATE ( SUM ( 'Fruit Sample Data Set'[ Units Sold ] ), ALL ( 'Fruit Sample Data Set'[Fruit] ) ) )
Regard
Hi @irnm8dn,
Could you post your table structures with some sample/mock data, and the expected against it? So that we can better assist on this issue. It's better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Regards
I have included a sample dataset and a ,pbix file. link
As you can see, my axis is using a date hierarchy. I want to show the percentage of units sold based on Year, Month, Day so that I can at any specific time how much of my sales during that time period are made up of which fruit.
I have also included some notes within the .pbix in the text box.
Thank you.
Hi @irnm8dn,
According to your description above, you want to show percentage(not percentage of grand total) as label on stacked column chart like below, but not like the 100% stacked column chart, right?
Currently, there is no option to show percentage(not percentage of grand total) as label on stacked column chart. You can add it as an idea on Power BI Ideas forum to improve Power BI on this feature.
An alternative solution is creating a new measure to calculate the percentage, and then show it as tooltips on the chart.
Measure = DIVIDE ( SUM ( 'Fruit Sample Data Set'[ Units Sold ] ), CALCULATE ( SUM ( 'Fruit Sample Data Set'[ Units Sold ] ), ALL ( 'Fruit Sample Data Set'[Fruit] ) ) )
Regard
THANK YOU @v-ljerr-msft !!! This DAX is exactly what I've been searching the internet for. Very much appreciated!
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 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |