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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Starseed
Frequent Visitor

Help with creating a line chart

I'm running into an issue trying to create a line chart.  This is what I'm trying to do (excel visual):

1.jpg

 

I've imported a table like this, with other columns such as year, project ID, title, etc.  And like the table above, it has columns for January, February, March, etc.  Note: There are multiple rows listing out all the projects, and each project ID has 2 rows with type equal to 'planned' or 'actual'.  I'm filtering my reports by project ID.

 

When trying to create a line chart comparing planned vs actual, I get this:

2.jpg

 

How can I fix this?  I feel like I have tried everything (aside from restructuring all the data I'm importing).

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Starseed ,

 

First, select the type column in the query editor and unpivot other columns.

test_unpiovt_month.PNG

Incorrect month sorting may appear in the chart. You can create a condition column to sort.

test_conditional_column.PNG

You can get this result.

test_Help with creating a line chart.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @Starseed ,

 

First, select the type column in the query editor and unpivot other columns.

test_unpiovt_month.PNG

Incorrect month sorting may appear in the chart. You can create a condition column to sort.

test_conditional_column.PNG

You can get this result.

test_Help with creating a line chart.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Great!  Got it to work.  Thanks for your help.

 

Reference for others looking to see how I solved the problem with the solution above:

  • I duplicated the table so other reports can still use the original data format.
  • I highlighted my Project Id and Year columns along with the Type column before selecting "Unpivot Other Columns", this way these columns didn't get merged into my date values.
  • I merged my Month column with the Year columns and converted it to a date which allowed me to skip the conditional column step in the solution above.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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