Forum Discussion

Betty888's avatar
Betty888
Helper II
3 years ago
Solved

Line chart with different lines per year

Dear all, 

I have a dataset that looks as below : 

CompanyYearSales 
1201860
1201930
1202035
2201825
2201963
2202035
3201898
3201996
3202022
4201865
4201989
4202075
5201849
5201912
5202032

 

and I want to create a graph as I tried to draw below πŸ™‚ 

1 line per year and X axis = Company name / Y axis = sales (my response variable).

Can you please suggest any way to do this in Power Bi please πŸ™

Thank you in advance for your help ! 

 

  • Hi Betty888  

    In order to get to the graph you drew, follow these steps:

    1. Choose line chart
    2. Put your parametrs like on pict :

    3. Set up a series labels 

    It is important to note that such a logical comparison is problematic.
    A trend line shows the evolution of an index over time.
    It is recommended to make an X-axis as a time axis in order to compare long-term trends between companies.
    For each company, there is a representative line.
    As you have several lines that collide, it is better to split it into smaller graphs so you don't create cognitive load
    Using "small multiples"
    As shown in the picture (with setup a right format and design)

     

    Link to sampke file with both options here 

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

5 Replies

  • Hi Betty888  

    In order to get to the graph you drew, follow these steps:

    1. Choose line chart
    2. Put your parametrs like on pict :

    3. Set up a series labels 

    It is important to note that such a logical comparison is problematic.
    A trend line shows the evolution of an index over time.
    It is recommended to make an X-axis as a time axis in order to compare long-term trends between companies.
    For each company, there is a representative line.
    As you have several lines that collide, it is better to split it into smaller graphs so you don't create cognitive load
    Using "small multiples"
    As shown in the picture (with setup a right format and design)

     

    Link to sampke file with both options here 

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

    • Anonymous's avatar
      Anonymous
      Not applicable

      hello thank you for explaine how to do it
      I have a question if anyone can help me 
      i have a line chart 

      I want to calculate the difference between each two points of the same date ?