The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello, I am new to Power BI and tried to look for existing posts with a similar situation but wasn't able to find a solution that worked for me, so I'm hoping someone here will have a solution!
I have this stacked bar graph that is categorized based on three degree levels, with each bar representing one year. I would like the data label to be calculated based on the percentage of degrees in that level based on the year (so the percentage of each color in that bar), but I can only calculate the percentage of degrees based on the grand total. I understand I can calculate percentage based on bar total if I use a 100% stacked bar graph, but I want to show the difference in total degrees awarded across the five years.
Thank you in advance!
This sounds like you want to calculate the % total across 5 years instead of each year? Is that correct? (Just trying to understand the question)
Ah sorry for being unclear, I mean the opposite, I would like to calculate % total over each year, not all 5 years.
Hi,
Share data in a format that can be pasted in an MS Excel file and show the expected result.
Hello, I'm sorry but I can't share the data file for privacy reasons. What I can do is include the data numbers in this format:
Below is the same chart with the number of each degree level (color) and the total at the end of the bar (year). So, I'm hoping to set up the data label as % degree level of the year. Here's a table that shows the calculation I want to display.
Doc | Mast | UG | |
2017-18 | 95/372=25.5% | 227/372=61% | 50/372=13.4% |
2018-19 | 91/347=26.2% | 222/347=64% | 34/347=9.7% |
2019-20 | 122/392=31.1% | 231/392=58.9% | 39/392=9.9% |
2020-21 | 118/444=26.6% | 253/444=57% | 73/444=16.4% |
2021-22 | 59/335=17.6% | 221/335=66% | 55/335=16.4% |
Please let me know if you have any other questions I can clarify, and thank you for your help.