Forum Discussion

Grizzlydad's avatar
Grizzlydad
Icon for Helper I rankHelper I
5 years ago
Solved

Create same line chart that is already in excel

Hi all

I am trying to create the same line chart that is pictured in Power Bi desktop, using the line chart visual. I can't get it to exactly replicate.  You can see it works as expected in excel.

I basically want a 3 week comparison of data flow, capturing each day of the week so that the week commencing line has a different colour.

There should be 3 line colours, one representing each week commencing and then the X axis should display the days of the week.

Any thoughts how I can achieve this, I need to know what to put in the relevant axis, legend and value fields?

 

 

 

  • P_D_G's avatar
    P_D_G
    5 years ago

    I think you have clicked on the "Unpivot Columns" instead of "Unpivot Other Columns" (see picture).

     

    This is the output you'll see:

     

    Hope it helps,

    PDG

     

6 Replies

  • P_D_G's avatar
    P_D_G
    Icon for Resolver III rankResolver III

    Hi Grizzlydad ,

     

    Go to Power Query, select the WeekCommencing column > Transform > Unpivot Other columns.

    You'll end up with 3 columns: 

    - Week Commencing

    - Attribute = name of the days

    - Value

     

    If you close &Apply you can use the following setting to get your desired result.

     

    (the chart is showing dummy data)

    Hope it helps,

    PDG

     

     

    • Grizzlydad's avatar
      Grizzlydad
      Icon for Helper I rankHelper I

      Hiya I did that but got 2 new columns in edit query, like so, and all the other columns remained.  I sthere a difference between Power Query and Edit query?

       

      • P_D_G's avatar
        P_D_G
        Icon for Resolver III rankResolver III

        I think you have clicked on the "Unpivot Columns" instead of "Unpivot Other Columns" (see picture).

         

        This is the output you'll see:

         

        Hope it helps,

        PDG