Forum Discussion

A_ksh's avatar
A_ksh
Frequent Visitor
2 years ago
Solved

Multiple Line chart problem

Hello Everyone 

 

I want a line chart which gives for example C14 for 2 different years with value of each day on same line chart. It is somehow easy to make this type of chart in excel but not in power BI 

Please also find attached image like whihc i want graph to be 

 

 

I have data like below


Date                 C10         C14          C16          C5TC         C8             C9

04-01-20162791.004405.00-1964.004811.006995.0012070.00
05-01-20162882.004450.00-1984.004676.006345.0012040.00
06-01-20162986.004473.00-1985.004760.006485.0012180.00
07-01-20162741.004205.00-2175.004198.005315.0011235.00
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi A_ksh ,

     

    The hierarchy of the x-axis in the chart you have given is Quarter-Month-Day, and you can set up the same hierarchy as shown below.

    Due to the design of PBI Desktop this is the closest you can get to an excel chart.

    If you would like to suggest  feature improvements, you may vote the idea and comment here to improve this feature. It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

     

    Best Regards,

    Neeko Tang

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

11 Replies

  • HotChilli's avatar
    HotChilli
    Community Champion

    Sample data with different years would help more but with this data :

    Date on the x-axis, individual measures on the y-axis.  If you want a quick chart just select the c10, c14 etc and add them to the y-axis

    --

    Or you can unpivot the C-columns and write one measure

  • A_ksh's avatar
    A_ksh
    Frequent Visitor

    Sorry but i tried and it is not helping, excel provide 2 legend option where i can select different different years and it will show Value of lets say C10 for 2 different year with different line, doing that in power bi just expands the x-axis for 2 years and give continoues graph. 

    I want to recreate same what is there in excel and showed in my question. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi A_ksh ,

     

    According to your description, here are my steps you can follow as a solution.

    (1) This is my test data.

    (2) We can create a calculated column.

    Year = YEAR('Table'[Date])

    (3) Then the result is as follows.

    Best Regards,

    Neeko Tang

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

    • A_ksh's avatar
      A_ksh
      Frequent Visitor

      Thank you so muc for the reply 

      But as you can see in excel line chart below we can have fixed x axis from january to december and it gives you option to choose year and different values of C10, C14 etc. so i select lets say 2021 and 2022 it gives me 2 lines of same C14 over the span of january to december, so that its easy to compare on month basis. 

      But in power BI it just extends the x-axis for 2 different year and even if i create table for month or select x axis for month it provides sum value for that month not the individual values of everyday. But in excel even though x axis is from Jan to Dec it still provides you daily data and makes graph more smooth. 

      here is the comparison of 2 same data in excel and in power bi. 

      This is graph in Excel. 

       

      This is graph in Power Bi. 




      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi A_ksh ,

         

        (1)We can create measures.

         

        _c10 = SUM('Table'[C10])
        _c14 = SUM('Table'[C14])
        _c16 = SUM('Table'[C16])

         

        ...

        (2)Creating Field Parameter.

        (3)Then the result is as follows.

         

        Best Regards,

        Neeko Tang

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