Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Line Graph using both axis of table

Hi All, I have the following table where the 1st row gives the months. I am able to make a chart from this in Excel (shown below), but I am unaware of a method in Power BI. Any help is welcome. Thanks.

 

 

Year123456789101112
2016-3.23-2.45-3.67-3.43-2.76-2.39-3.22-2.27-0.04-6.19-1.94-7.90
2017-6.55-6.15-9.40-13.07-8.340.890.96-0.46-0.470.97-0.94-2.02
2018-2.54-1.02-0.232.441.7012.524.133.091.48-0.79-3.55-5.20
2019-4.08-4.96-2.54-3.01-3.54-1.88-2.68-1.45-1.81-1.27-0.950.06

  • Just unpivot the data in query editor.  Right click on first column and choose Unpivot Other Columns, make the Attribute and Value columns numeric types (if needed), and load the table.  Then make a line chart and use Year as the legend to get the chart below.

     

     

     

    Regards,

    Pat

     

2 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    Just unpivot the data in query editor.  Right click on first column and choose Unpivot Other Columns, make the Attribute and Value columns numeric types (if needed), and load the table.  Then make a line chart and use Year as the legend to get the chart below.

     

     

     

    Regards,

    Pat

     

  • Anonymous 

    First, you need to unpivot the data, then you can create the chart as you need.

    Please refer this video: https://www.youtube.com/watch?v=Vff2kRBM95o&t

     

    ________________________

    If my answer was helpful, please consider Accept it as the solution to help the other members find it

    Click on the Thumbs-Up icon if you like this reply 🙂

    YouTube  LinkedIn