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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
rlsmith1994
Helper II
Helper II

Calculate percent by column for a line chart

I have a viz table that calculates column percents based of a toal:

rlsmith1994_3-1694572035762.png

I would like a line chart to do the same. However, the line chart in Power BI doesn't do that. The line chart only calculates percent of total of all values for all years, not by individual year. 

 

rlsmith1994_4-1694572052831.png

 

How do I get the line chart to calculate column percents by year?

 

Context

The percents in the table are based on the value column in the screenshot below. That is my data table. That column is pivoted. There are four possible values (1,2,3,4). I have a filter table set up with the text ("have not decided, plan to do," etc.). 

rlsmith1994_2-1694571663873.png

The Years in the line chart and table come from a different table I call demographics. The relationship between the demographics and data tables are surveyid (screenshot above). I use the demographics table to filter the data table. 

 

I can't believe I am the only one with this issue. I would really appreciate anyone's help with this. Thank you. 

 

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @rlsmith1994 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Got it - thanks for the advice! I will create a new post and upload sample files.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.