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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply

line chart help

I need a bit of help plotting a line graph. Not sure its how i have my data or how i'm using the graph settings

 

I have 10 sites with finance data over 5 years for each site.

I want to plot the year over the x axis. Each site is a line on the graph. Y is the value. We can then see growth over time or not growth over time.

Excel looks like

 

site18/1919/2020/21
14564655677688990
24353456756780978
36563456767470077
1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @jblackburnHWGA 

According to your description and sample data, I think you can use the “Unpiovit columns” operation in the Power Query to get the correct data model to achieve your requirement, you can try my steps:

  1. Go to the Power Query and click like this:

vrobertqmsft_0-1624005067839.png

 

Then you can get the correct data model like this:

vrobertqmsft_1-1624005067842.png

 

  1. Click on “Close and apply” and create a line chart and place it like this:

vrobertqmsft_2-1624005067851.png

 

You can also create a slicer for the [Site] to slice the chart by site id, like this:

vrobertqmsft_3-1624005067853.png

 

And you can get what you want.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

5 REPLIES 5
v-robertq-msft
Community Support
Community Support

Hi, @jblackburnHWGA 

According to your description and sample data, I think you can use the “Unpiovit columns” operation in the Power Query to get the correct data model to achieve your requirement, you can try my steps:

  1. Go to the Power Query and click like this:

vrobertqmsft_0-1624005067839.png

 

Then you can get the correct data model like this:

vrobertqmsft_1-1624005067842.png

 

  1. Click on “Close and apply” and create a line chart and place it like this:

vrobertqmsft_2-1624005067851.png

 

You can also create a slicer for the [Site] to slice the chart by site id, like this:

vrobertqmsft_3-1624005067853.png

 

And you can get what you want.

You can download my test pbix file below

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

Yes all working. Many thanks

lance_6
Helper II
Helper II

You need to structure your data differently to work with that scenario. 
Here is the best way for that: 

data.png

 

 

 

 

 

 

 

 

 Then put the data in your line chart feilds as follows: 

Axis : `Date`

Legend : `Site`

Values : `Value`

Did this work for you?

my table didn't come out well lol hope you get the idea

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.