Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello,
Can I able to create a 100% stacked bar graph that includes a line as well
The table below
Many thanks
Solved! Go to Solution.
You'll need a measure like this one. In my case, Year is the x axis and the legend is Product Categories. This measure is in the values (and a different measure is in the line).
Pct of Year Total =
VAR thiscategory = [Total Sales]
VAR allcategory =
CALCULATE ( [Total Sales], REMOVEFILTERS ( 'Product'[Category] ) )
RETURN
DIVIDE ( thiscategory, allcategory )
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Yes. You can use a line and stacked chart with a measure that shows the % of total for that category instead of the actual values (so they all add to 1). You can add the actual values in the tooltip if needed.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat Thank you for your reply.
How can I write the measure to show the percentages oftotal? I am new to Power BI
You'll need a measure like this one. In my case, Year is the x axis and the legend is Product Categories. This measure is in the values (and a different measure is in the line).
Pct of Year Total =
VAR thiscategory = [Total Sales]
VAR allcategory =
CALCULATE ( [Total Sales], REMOVEFILTERS ( 'Product'[Category] ) )
RETURN
DIVIDE ( thiscategory, allcategory )
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
77 | |
60 | |
58 | |
58 |
User | Count |
---|---|
151 | |
113 | |
99 | |
80 | |
72 |