Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
RedTangerine
Frequent Visitor

100% Stacked Column Chart Converted to Line Chart

 

Currently I have 2 charts column and 100% stacked column.

I need to show these as line charts with trend lines.

 

 

image.png

 

The first I can do resonably easy but I cannto figure out how to go about getting the line chart to work as a 100% stacked line chart. Specifically I need to show how many of my incidents are posted status against the monthly total.

 

 

1 ACCEPTED SOLUTION
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @RedTangerine,

Based on my understanding, I create the following sample table.

sample tablesample table
Then I create a 100% sttacked column chart similar with yours, please see the screenshot.

2.PNG

Finally, create a measure using the formula to get the posted status vs total, and transfer the 100% Stacked Column Chart to Line Chart.

posted-percentage = CALCULATE(SUM(Table3[value]),FILTER(Table3,Table3[status]="posted"))/SUM(Table3[value])


If you want to calculate the percentage of unposted, just replace the posted to unposted in the filter of measure.

Create a line chart, select the data as x-axis, the measure as value, you will get expected result.

3.PNG

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @RedTangerine,

Based on my understanding, I create the following sample table.

sample tablesample table
Then I create a 100% sttacked column chart similar with yours, please see the screenshot.

2.PNG

Finally, create a measure using the formula to get the posted status vs total, and transfer the 100% Stacked Column Chart to Line Chart.

posted-percentage = CALCULATE(SUM(Table3[value]),FILTER(Table3,Table3[status]="posted"))/SUM(Table3[value])


If you want to calculate the percentage of unposted, just replace the posted to unposted in the filter of measure.

Create a line chart, select the data as x-axis, the measure as value, you will get expected result.

3.PNG

Best Regards,
Angelia

Thank you.

This was exactly what I needed.

image.png

I changed it a little so that Count was used instead of sum and an extra calculate so that I could multiple by 100

but overall the solution was spot on:

posted-percentage = CALCULATE(CALCULATE(COUNT('riskman incident_fact'[Status (groups)]),FILTER('riskman incident_fact','riskman incident_fact'[Status (groups)]="posted"))/COUNT('riskman incident_fact'[Status (groups)])*100)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.